aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2013-06-24 19:31:58 +0000
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-06-24 15:42:56 -0500
commit02a7d3573d551c5d169eaa465ef90349d1ee367e (patch)
tree0e11ef78ea21951f212225f0abfb60f3e5f3d864
parent9f14fd7ae10d8ae724045a57a2eb25c1d4290a3b (diff)
efivarfs: Support EFI variable access in 3.10 kernels.
In the 3.10 kernel, EFI variables are now provided by a dedicated filesystem that needs to be mounted. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--init.d/sysfs.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index 114a6530..7658cb5f 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -81,6 +81,20 @@ mount_misc()
eend $?
fi
fi
+
+ # setup up kernel support for efivarfs
+ # slightly complicated, as if it's build as a module but NOT yet loaded,
+ # it will NOT appear in /proc/filesystems yet
+ if [ -d /sys/firmware/efi/efivars ] \
+ && ! mountinfo -q /sys/firmware/efi/efivars; then
+ modprobe -q efivarfs
+ 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
}
mount_cgroups()