public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:0.22.x commit in: init.d/
Date: Wed,  5 Oct 2016 16:42:31 +0000 (UTC)	[thread overview]
Message-ID: <1475685700.b5a7222fe062c691ba5d05d27195eeb646c90b86.williamh@OpenRC> (raw)

commit:     b5a7222fe062c691ba5d05d27195eeb646c90b86
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Oct  4 16:51:24 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Oct  5 16:41:40 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b5a7222f

init.d/sysfs: fix efivarfs handling

Separate loading the module, if it isn't built in or loaded, from
mounting the file system.

This also makes sure the warning about configuring the module in
/etc/conf.d/modules or building it in is displayed only if it is loaded
successfully.

X-Gentoo-Bug: 595836
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=595836

 init.d/sysfs.in | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index b9478f8..acaae16 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -98,15 +98,13 @@ mount_misc()
 		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
-		if modprobe -q efivarfs; then
-			ewarn "The efivarfs module needs to be configured in" \
-				"@SYSCONFDIR@/conf.d/modules or built in"
-		fi
+	# set up kernel support for efivarfs
+	if [ ! -d /sys/module/efivarfs ] && 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} \


             reply	other threads:[~2016-10-05 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 16:42 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-10-05 16:42 [gentoo-commits] proj/openrc:0.22.x commit in: init.d/ William Hubbs
2016-10-06 13:58 William Hubbs
2016-11-03 18:24 William Hubbs
2016-11-03 18:24 William Hubbs
2016-11-03 18:33 William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475685700.b5a7222fe062c691ba5d05d27195eeb646c90b86.williamh@OpenRC \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox