diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2016-10-05 22:43:56 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2016-10-05 22:48:17 -0500 |
commit | deaae7ab5c499191426cec81f6e803c972f0cca3 (patch) | |
tree | b9494fe650a7a81041f17c31444ddc9c31d0d686 /init.d/sysfs.in | |
parent | 3d2c2f0b871944492036d04b0c220ccba1fa2dd5 (diff) |
init.d/sysfs: load efivarfs module when booting in efi mode:1
The presence of /sys/firmware/efi is used to indicate that the system
was booted in efi mode.
Diffstat (limited to 'init.d/sysfs.in')
-rw-r--r-- | init.d/sysfs.in | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in index 7183e5d8..6d6ec62c 100644 --- a/init.d/sysfs.in +++ b/init.d/sysfs.in @@ -99,17 +99,22 @@ mount_misc() fi # set up kernel support for efivarfs - if [ ! -d /sys/firmware/efi/efivars ] && modprobe -q efivarfs; then - ewarn "The efivarfs module needs to be configured in " \ - "@SYSCONFDIR@/conf.d/modules or built in" - fi - if [ -d /sys/firmware/efi/efivars ] && - ! mountinfo -q /sys/firmware/efi/efivars; then - if grep -qs efivarfs /proc/filesystems; then - ebegin "Mounting efivarfs filesystem" - mount -n -t efivarfs -o ${sysfs_opts} \ - efivarfs /sys/firmware/efi/efivars - eend $? + # The presence of /sys/firmware/efi indicates that the system was + # booted in efi mode. + if [ -d /sys/firmware/efi ]; then + if [ ! -d /sys/firmware/efi/efivars ] && + modprobe -q efivarfs; then + ewarn "The efivarfs module needs to be configured in " \ + "@SYSCONFDIR@/conf.d/modules or built in" + fi + if [ -d /sys/firmware/efi/efivars ] && + ! mountinfo -q /sys/firmware/efi/efivars; then + if grep -qs efivarfs /proc/filesystems; then + ebegin "Mounting efivarfs filesystem" + mount -n -t efivarfs -o ${sysfs_opts} \ + efivarfs /sys/firmware/efi/efivars + eend $? + fi fi fi } |