X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=e659549e194b77c08ec70afcde932fbccfa959ad;hp=8e4a09f2a4b024d7fb53745bcd342ac39630746a;hb=23afbaf0a75b0b6144675c7f419fdbfa9dfa8522;hpb=14203ccf156430ede6bfc55fb19a142dcf8c7397 diff --git a/autoconfig.functions b/autoconfig.functions index 8e4a09f..e659549 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -259,7 +259,7 @@ config_language(){ if [ -r /usr/share/consolefonts/Uni3-Terminus16.psf.gz ] ; then CONSOLEFONT='Uni3-Terminus16' else - ewarn "/usr/share/consolefonts/Uni3-Terminus16.psf.gz not available. Please upgrade package console-terminus." ; eend 1 + ewarn "/usr/share/consolefonts/Uni3-Terminus16.psf.gz not available. Please upgrade package console-setup-linux." ; eend 1 fi if ! hasfb ; then CONSOLEFONT='Lat15-Terminus16' @@ -549,20 +549,19 @@ running_under_secureboot() { # doesn't work as needed as it relies on /sys/firmware/efi/efivars (while # /sys/firmware/efi/vars would exist) if ! $SYSTEMD ; then - if modprobe efivars &>/dev/null ; then + if modprobe efivarfs &>/dev/null ; then mount -t efivarfs efivarfs /sys/firmware/efi/efivars fi fi - if [ -x /usr/bin/mokutil ] ; then - local secstate=$(mokutil --sb-state 2>/dev/null) # "SecureBoot enabled" - if [ -n "$secstate" ] ; then + if [[ -x "$(command -v mokutil)" ]] ; then + if mokutil --sb-state 2>/dev/null | grep -q 'SecureBoot enabled' ; then return 0 else return 1 fi else - if modprobe efivars &>/dev/null ; then + if modprobe efivarfs &>/dev/null ; then if od -An -t u1 /sys/firmware/efi/vars/SecureBoot-*/data 2>/dev/null | grep -q 1 ; then return 0 else @@ -1643,7 +1642,7 @@ config_dmraid(){ fi if ! [ -x /sbin/dmraid ] ; then - eerror "dmraid not available, can not execute it." ; eend 1 + ewarn "dmraid not available, can not execute it." ; eend 1 return fi