From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BE85D138330 for ; Tue, 4 Oct 2016 17:08:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE519E0BA8; Tue, 4 Oct 2016 17:08:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D2416E0BA8 for ; Tue, 4 Oct 2016 17:08:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6AF06340FEE for ; Tue, 4 Oct 2016 17:08:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0DA45244E for ; Tue, 4 Oct 2016 17:08:01 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1475600818.6a0c033a64ce18056625cd37a94b9810dc5784e3.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/sysfs.in X-VCS-Directories: init.d/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 6a0c033a64ce18056625cd37a94b9810dc5784e3 X-VCS-Branch: master Date: Tue, 4 Oct 2016 17:08:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 78d081a9-36f0-459a-9743-2bc95e9a1b3f X-Archives-Hash: 5523f1f56b01a080abf725608094e7bd commit: 6a0c033a64ce18056625cd37a94b9810dc5784e3 Author: William Hubbs gmail com> AuthorDate: Tue Oct 4 16:51:24 2016 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Oct 4 17:06:58 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=6a0c033a 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} \