projects
/
grml-autoconfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release new version 0.20.4
[grml-autoconfig.git]
/
autoconfig.functions
diff --git
a/autoconfig.functions
b/autoconfig.functions
index
48bf32c
..
891242e
100755
(executable)
--- a/
autoconfig.functions
+++ b/
autoconfig.functions
@@
-212,12
+212,8
@@
fi
config_log(){
if checkbootparam 'log' || checkbootparam 'debug' ; then
export DEBUG="/tmp/grml.log.`date +%Y%m%d`"
config_log(){
if checkbootparam 'log' || checkbootparam 'debug' ; then
export DEBUG="/tmp/grml.log.`date +%Y%m%d`"
- touch $DEBUG
- einfo "Bootparameter log found. Log files: ${DEBUG} and /var/log/boot"
- eindent
- einfo "Starting bootlogd." # known to be *very* unreliable :(
- bootlogd -r -c >>$DEBUG 2>&1 ; eend $?
- eoutdent
+ touch "${DEBUG}"
+ einfo "Bootparameter log found, debug log file from grml-autoconfig available at '${DEBUG}'"
else
DEBUG="/dev/null"
fi
else
DEBUG="/dev/null"
fi
@@
-549,20
+545,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
# 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 efivar
f
s &>/dev/null ; then
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
fi
fi
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
return 0
else
return 1
fi
else
- if modprobe efivars &>/dev/null ; then
+ if modprobe efivar
f
s &>/dev/null ; then
if od -An -t u1 /sys/firmware/efi/vars/SecureBoot-*/data 2>/dev/null | grep -q 1 ; then
return 0
else
if od -An -t u1 /sys/firmware/efi/vars/SecureBoot-*/data 2>/dev/null | grep -q 1 ; then
return 0
else