X-Git-Url: https://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=autoconfig.functions;h=c6ed6f2e19e5166070ffa5dd7102e19e48a4f69c;hb=5e3222d2cff12b9297743bb6d4fccc470ccc9f83;hp=8ae71d1a66b8e45855e5f70c2ccbfa536c011282;hpb=eedf0cbce6d2f8f5723a6716beb20099317235dc;p=grml-autoconfig.git diff --git a/autoconfig.functions b/autoconfig.functions index 8ae71d1..c6ed6f2 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -512,6 +512,14 @@ config_kernel(){ # {{{ secure boot config_secureboot(){ + # systemd does this for us, but if we are not running under systemd then mokutil + # doesn't work as needed as it relies on /sys/firmware/efi/efivars (while + # /sys/firmware/efi/vars would exist) + if ! $SYSTEMD ; then + modprobe efivars + mount -t efivarfs efivarfs /sys/firmware/efi/efivars + fi + if [ -x /usr/bin/mokutil ] ; then local secstate=$(mokutil --sb-state 2>/dev/null) # "SecureBoot enabled" if [ -n "$secstate" ] ; then