X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;fp=autoconfig.functions;h=01d2a5770812ed644b465c872e68ecfa0df5a9fd;hp=8ae71d1a66b8e45855e5f70c2ccbfa536c011282;hb=71e0695dbec19af6e9f0d6633957b40a6223bfab;hpb=5f9a52ce032f1410e741d3b97e02d9d59d911d60 diff --git a/autoconfig.functions b/autoconfig.functions index 8ae71d1..01d2a57 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 efivars 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