diff options
Diffstat (limited to 'DEBIAN/postinst')
| -rwxr-xr-x | DEBIAN/postinst | 34 |
1 files changed, 29 insertions, 5 deletions
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 - |
