aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Misic <twoexem@gmail.com>2026-03-25 22:58:43 +0100
committerMilan Misic <twoexem@gmail.com>2026-03-25 22:58:43 +0100
commit1100c261144e6b1b18edc329fae53fb9d0ece8c2 (patch)
treebf09ae25bf1e3582fae458e787392f59955d6f4a
parent92092c07b83220bdb9b9cdd9141c9479d469160e (diff)
Add logic to handle MOK cert location difference, bump version
-rw-r--r--DEBIAN/control2
-rwxr-xr-xDEBIAN/postinst34
-rwxr-xr-xDEBIAN/prerm2
-rw-r--r--usr/src/st-lsm6dsx-shift13mi-1.2/Makefile (renamed from usr/src/st-lsm6dsx-shift13mi-1.1/Makefile)0
-rw-r--r--usr/src/st-lsm6dsx-shift13mi-1.2/dkms.conf (renamed from usr/src/st-lsm6dsx-shift13mi-1.1/dkms.conf)2
-rw-r--r--usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx.h (renamed from usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx.h)0
-rw-r--r--usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_buffer.c (renamed from usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_buffer.c)0
-rw-r--r--usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_core.c (renamed from usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_core.c)0
-rw-r--r--usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_i2c.c (renamed from usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_i2c.c)0
-rw-r--r--usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_shub.c (renamed from usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_shub.c)0
10 files changed, 32 insertions, 8 deletions
diff --git a/DEBIAN/control b/DEBIAN/control
index eddd8aa..e4f462a 100644
--- a/DEBIAN/control
+++ b/DEBIAN/control
@@ -1,5 +1,5 @@
Package: st-lsm6dsx-shift13mi
-Version: 1.1-1
+Version: 1.2-1
Architecture: amd64
Maintainer: Milan Misic <twoexem@gmail.com>
Depends: dkms, linux-headers-generic, iio-sensor-proxy, mokutil
diff --git a/DEBIAN/postinst b/DEBIAN/postinst
index cb2ba68..90637f8 100755
--- a/DEBIAN/postinst
+++ b/DEBIAN/postinst
@@ -4,9 +4,9 @@ set -e
lang=$(locale | grep LANG | cut -d= -f2 | cut -d_ -f1)
# Install the module with dkms
-dkms add st-lsm6dsx-shift13mi/1.1 || true
-dkms build st-lsm6dsx-shift13mi/1.1 || true
-dkms install st-lsm6dsx-shift13mi/1.1 || true
+dkms add st-lsm6dsx-shift13mi/1.2 || true
+dkms build st-lsm6dsx-shift13mi/1.2 || true
+dkms install st-lsm6dsx-shift13mi/1.2 || true
# Unload the old module and reload the new module
modprobe -r st_lsm6dsx_i2c || true
@@ -19,8 +19,32 @@ systemctl restart iio-sensor-proxy || true
if mokutil --sb-state 2>/dev/null | grep -q "SecureBoot enabled"; then
- mokutil --import /var/lib/dkms/mok.pub
+ MOK_PATH=""
+ if [ -f /var/lib/shim-signed/mok/MOK.der ]; then
+ MOK_PATH="/var/lib/shim-signed/mok/MOK.der"
+ elif [ -f /var/lib/dkms/mok.pub ]; then
+ MOK_PATH="/var/lib/dkms/mok.pub"
+ fi
+
+ if [ -n "$MOK_PATH" ]; then
+ if [ "$lang" == "de" ]; then
+ echo -e "\n#################\nBitte nun ein Passwort eingeben. Dieses wird beim Neustart abgefragt."
+ else
+ echo -e "\n#################\nPlease enter a password. It will be requested on next reboot."
+ fi
+
+ mokutil --import "$MOK_PATH"
+ else
+
+ if [ "$lang" == "de" ]; then
+ echo "Konnte den MOK-Schlüssel nicht finden. Bitte installier ihn manuell: mokutil --import <pfad-zu-mok>"
+ else
+ echo "Could not find MOK key. Please import it manually with: mokutil --import <path-to-mok>"
+ fi
+ fi
+
+
if [ "$lang" == "de" ]; then
echo "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"
echo "┃ Für alle Secure-Boot-Nutzer: ┃"
@@ -32,6 +56,7 @@ if mokutil --sb-state 2>/dev/null | grep -q "SecureBoot enabled"; then
echo "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
else
+
echo "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"
echo "┃ For all Secure Boot users: ┃"
echo "┃The next time you reboot, you will be┃"
@@ -41,4 +66,3 @@ if mokutil --sb-state 2>/dev/null | grep -q "SecureBoot enabled"; then
echo "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
fi
fi
-
diff --git a/DEBIAN/prerm b/DEBIAN/prerm
index acdc994..b904e69 100755
--- a/DEBIAN/prerm
+++ b/DEBIAN/prerm
@@ -1,7 +1,7 @@
#/bin/bash
set -e
-dkms remove st-lsm6dsx-shift13mi/0.1 --all || true
+dkms remove st-lsm6dsx-shift13mi/1.2 --all || true
modprobe -r st_lsm6dsx_i2c || true
modprobe st_lsm6dsx_i2c || true
diff --git a/usr/src/st-lsm6dsx-shift13mi-1.1/Makefile b/usr/src/st-lsm6dsx-shift13mi-1.2/Makefile
index 787d987..787d987 100644
--- a/usr/src/st-lsm6dsx-shift13mi-1.1/Makefile
+++ b/usr/src/st-lsm6dsx-shift13mi-1.2/Makefile
diff --git a/usr/src/st-lsm6dsx-shift13mi-1.1/dkms.conf b/usr/src/st-lsm6dsx-shift13mi-1.2/dkms.conf
index caabebd..58a2718 100644
--- a/usr/src/st-lsm6dsx-shift13mi-1.1/dkms.conf
+++ b/usr/src/st-lsm6dsx-shift13mi-1.2/dkms.conf
@@ -1,5 +1,5 @@
PACKAGE_NAME="st-lsm6dsx-shift13mi"
-PACKAGE_VERSION="1.1"
+PACKAGE_VERSION="1.2"
BUILT_MODULE_NAME[0]="st_lsm6dsx_i2c"
diff --git a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx.h b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx.h
index 6405a53..6405a53 100644
--- a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx.h
+++ b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx.h
diff --git a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_buffer.c b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_buffer.c
index 55d8777..55d8777 100644
--- a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_buffer.c
+++ b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_buffer.c
diff --git a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_core.c b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_core.c
index dc78227..dc78227 100644
--- a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_core.c
+++ b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_core.c
diff --git a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_i2c.c b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_i2c.c
index b2a7c2e..b2a7c2e 100644
--- a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_i2c.c
+++ b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_i2c.c
diff --git a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_shub.c b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_shub.c
index d6a1eeb..d6a1eeb 100644
--- a/usr/src/st-lsm6dsx-shift13mi-1.1/st_lsm6dsx_shub.c
+++ b/usr/src/st-lsm6dsx-shift13mi-1.2/st_lsm6dsx_shub.c