1 |
commit: b5a7222fe062c691ba5d05d27195eeb646c90b86 |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Oct 4 16:51:24 2016 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 5 16:41:40 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b5a7222f |
7 |
|
8 |
init.d/sysfs: fix efivarfs handling |
9 |
|
10 |
Separate loading the module, if it isn't built in or loaded, from |
11 |
mounting the file system. |
12 |
|
13 |
This also makes sure the warning about configuring the module in |
14 |
/etc/conf.d/modules or building it in is displayed only if it is loaded |
15 |
successfully. |
16 |
|
17 |
X-Gentoo-Bug: 595836 |
18 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=595836 |
19 |
|
20 |
init.d/sysfs.in | 16 +++++++--------- |
21 |
1 file changed, 7 insertions(+), 9 deletions(-) |
22 |
|
23 |
diff --git a/init.d/sysfs.in b/init.d/sysfs.in |
24 |
index b9478f8..acaae16 100644 |
25 |
--- a/init.d/sysfs.in |
26 |
+++ b/init.d/sysfs.in |
27 |
@@ -98,15 +98,13 @@ mount_misc() |
28 |
fi |
29 |
fi |
30 |
|
31 |
- # setup up kernel support for efivarfs |
32 |
- # slightly complicated, as if it's build as a module but NOT yet loaded, |
33 |
- # it will NOT appear in /proc/filesystems yet |
34 |
- if [ -d /sys/firmware/efi/efivars ] \ |
35 |
- && ! mountinfo -q /sys/firmware/efi/efivars; then |
36 |
- if modprobe -q efivarfs; then |
37 |
- ewarn "The efivarfs module needs to be configured in" \ |
38 |
- "@SYSCONFDIR@/conf.d/modules or built in" |
39 |
- fi |
40 |
+ # set up kernel support for efivarfs |
41 |
+ if [ ! -d /sys/module/efivarfs ] && modprobe -q efivarfs; then |
42 |
+ ewarn "The efivarfs module needs to be configured in " \ |
43 |
+ "@SYSCONFDIR@/conf.d/modules or built in" |
44 |
+ fi |
45 |
+ if [ -d /sys/firmware/efi/efivars ] && |
46 |
+ ! mountinfo -q /sys/firmware/efi/efivars; then |
47 |
if grep -qs efivarfs /proc/filesystems; then |
48 |
ebegin "Mounting efivarfs filesystem" |
49 |
mount -n -t efivarfs -o ${sysfs_opts} \ |