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 0E83B138330 for ; Thu, 6 Oct 2016 03:49:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B5B6E0A5F; Thu, 6 Oct 2016 03:49:08 +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 200D6E0A5F for ; Thu, 6 Oct 2016 03:49:08 +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 D8B62341195 for ; Thu, 6 Oct 2016 03:49:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 46CC024A8 for ; Thu, 6 Oct 2016 03:49:02 +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: <1475725697.deaae7ab5c499191426cec81f6e803c972f0cca3.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: deaae7ab5c499191426cec81f6e803c972f0cca3 X-VCS-Branch: master Date: Thu, 6 Oct 2016 03:49:02 +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: 7774a295-4dce-444c-a0d9-b7f67811576c X-Archives-Hash: 69c6b327bf740f9d38fb7a865df0dfd7 commit: deaae7ab5c499191426cec81f6e803c972f0cca3 Author: William Hubbs gmail com> AuthorDate: Thu Oct 6 03:43:56 2016 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Oct 6 03:48:17 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=deaae7ab init.d/sysfs: load efivarfs module when booting in efi mode:1 The presence of /sys/firmware/efi is used to indicate that the system was booted in efi mode. init.d/sysfs.in | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/init.d/sysfs.in b/init.d/sysfs.in index 7183e5d..6d6ec62 100644 --- a/init.d/sysfs.in +++ b/init.d/sysfs.in @@ -99,17 +99,22 @@ mount_misc() fi # set up kernel support for efivarfs - if [ ! -d /sys/firmware/efi/efivars ] && 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} \ - efivarfs /sys/firmware/efi/efivars - eend $? + # The presence of /sys/firmware/efi indicates that the system was + # booted in efi mode. + if [ -d /sys/firmware/efi ]; then + if [ ! -d /sys/firmware/efi/efivars ] && + 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} \ + efivarfs /sys/firmware/efi/efivars + eend $? + fi fi fi }