1 |
commit: a537bd7abb8d3d1841635c78f9163e6d1abad0ba |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Oct 6 03:43:56 2016 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 6 13:31:21 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=a537bd7a |
7 |
|
8 |
init.d/sysfs: load efivarfs module when booting in efi mode |
9 |
|
10 |
The presence of /sys/firmware/efi is used to indicate that the system |
11 |
was booted in efi mode. |
12 |
|
13 |
init.d/sysfs.in | 27 ++++++++++++++++----------- |
14 |
1 file changed, 16 insertions(+), 11 deletions(-) |
15 |
|
16 |
diff --git a/init.d/sysfs.in b/init.d/sysfs.in |
17 |
index 7183e5d..6d6ec62 100644 |
18 |
--- a/init.d/sysfs.in |
19 |
+++ b/init.d/sysfs.in |
20 |
@@ -99,17 +99,22 @@ mount_misc() |
21 |
fi |
22 |
|
23 |
# set up kernel support for efivarfs |
24 |
- if [ ! -d /sys/firmware/efi/efivars ] && modprobe -q efivarfs; then |
25 |
- ewarn "The efivarfs module needs to be configured in " \ |
26 |
- "@SYSCONFDIR@/conf.d/modules or built in" |
27 |
- fi |
28 |
- if [ -d /sys/firmware/efi/efivars ] && |
29 |
- ! mountinfo -q /sys/firmware/efi/efivars; then |
30 |
- if grep -qs efivarfs /proc/filesystems; then |
31 |
- ebegin "Mounting efivarfs filesystem" |
32 |
- mount -n -t efivarfs -o ${sysfs_opts} \ |
33 |
- efivarfs /sys/firmware/efi/efivars |
34 |
- eend $? |
35 |
+ # The presence of /sys/firmware/efi indicates that the system was |
36 |
+ # booted in efi mode. |
37 |
+ if [ -d /sys/firmware/efi ]; then |
38 |
+ if [ ! -d /sys/firmware/efi/efivars ] && |
39 |
+ modprobe -q efivarfs; then |
40 |
+ ewarn "The efivarfs module needs to be configured in " \ |
41 |
+ "@SYSCONFDIR@/conf.d/modules or built in" |
42 |
+ fi |
43 |
+ if [ -d /sys/firmware/efi/efivars ] && |
44 |
+ ! mountinfo -q /sys/firmware/efi/efivars; then |
45 |
+ if grep -qs efivarfs /proc/filesystems; then |
46 |
+ ebegin "Mounting efivarfs filesystem" |
47 |
+ mount -n -t efivarfs -o ${sysfs_opts} \ |
48 |
+ efivarfs /sys/firmware/efi/efivars |
49 |
+ eend $? |
50 |
+ fi |
51 |
fi |
52 |
fi |
53 |
} |