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.
This commit is contained in:
William Hubbs 2016-10-05 22:43:56 -05:00
parent 3d2c2f0b87
commit deaae7ab5c

View File

@ -99,7 +99,11 @@ mount_misc()
fi fi
# set up kernel support for efivarfs # set up kernel support for efivarfs
if [ ! -d /sys/firmware/efi/efivars ] && modprobe -q efivarfs; then # 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 " \ ewarn "The efivarfs module needs to be configured in " \
"@SYSCONFDIR@/conf.d/modules or built in" "@SYSCONFDIR@/conf.d/modules or built in"
fi fi
@ -112,6 +116,7 @@ mount_misc()
eend $? eend $?
fi fi
fi fi
fi
} }
mount_cgroups() mount_cgroups()