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 6506813832E for ; Fri, 19 Aug 2016 16:09:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AC86FE0AD7; Fri, 19 Aug 2016 16:09:29 +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 39D01E0AD7 for ; Fri, 19 Aug 2016 16:09:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 B8A93340688 for ; Fri, 19 Aug 2016 16:09:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A73428F4 for ; Fri, 19 Aug 2016 16:09:24 +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: <1471622907.73cdf10f1f513be7b5dec4f1cc91e0c68cda689b.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/hwclock.in init.d/procfs.in init.d/sysfs.in X-VCS-Directories: init.d/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 73cdf10f1f513be7b5dec4f1cc91e0c68cda689b X-VCS-Branch: master Date: Fri, 19 Aug 2016 16:09:24 +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: b8216b70-5f42-4aec-b460-02a5ea05f444 X-Archives-Hash: d9fee20e4f87f8c54680f6e557ab2cb9 commit: 73cdf10f1f513be7b5dec4f1cc91e0c68cda689b Author: William Hubbs gmail com> AuthorDate: Thu Aug 18 21:25:56 2016 +0000 Commit: William Hubbs gentoo org> CommitDate: Fri Aug 19 16:08:27 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=73cdf10f Deprecate automatic loading of modules In the hwclock, procfs and sysfs service scripts, we automatically attempt to load the kernel modules we need before we take any action. We shouldn't do this, because there are systems which do not use kernel modules and do not have the kmod package installed. With this change, we continue to load the modules ourselves, but we warn the admin that they need to be added to /etc/conf.d/modules or built into the kernel. In the future, this automatic loading will be dropped. X-Gentoo-Bug: 342313 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=342313 init.d/hwclock.in | 10 ++++++++-- init.d/procfs.in | 8 ++++++-- init.d/sysfs.in | 6 +++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/init.d/hwclock.in b/init.d/hwclock.in index 2cd1ef3..d28ac85 100644 --- a/init.d/hwclock.in +++ b/init.d/hwclock.in @@ -30,6 +30,7 @@ fi depend() { provide clock + want modules if yesno $clock_adjfile; then use root else @@ -81,7 +82,7 @@ get_noadjfile() start() { - local retval=0 errstr="" + local retval=0 errstr="" modname setupopts if [ -z "$utc_cmd" ]; then @@ -96,7 +97,12 @@ start() [ -e "$rtc" ] && break done if [ ! -e "${rtc}" ]; then - modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc + for x in rtc-cmos rtc genrtc; do + modprobe -q $x && modname=$x && break + done + [ -n "$modname" ] && + ewarn "The $modname module needs to be configured in \ + @SYSCONFDIR@/conf.d/modules or built in." fi fi diff --git a/init.d/procfs.in b/init.d/procfs.in index de61873..055b5f4 100644 --- a/init.d/procfs.in +++ b/init.d/procfs.in @@ -13,7 +13,8 @@ description="Mounts misc filesystems in /proc." depend() { - use modules devfs + use devfs + want modules need localmount keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver } @@ -22,7 +23,10 @@ start() { # Setup Kernel Support for miscellaneous Binary Formats if [ -d /proc/sys/fs/binfmt_misc -a ! -e /proc/sys/fs/binfmt_misc/register ]; then - modprobe -q binfmt-misc + if modprobe -q binfmt-misc; then + ewarn "The binfmt-misc module needs to be configured in \ + @SYSCONFDIR@/conf.d/modules or built in." + fi if grep -qs binfmt_misc /proc/filesystems; then ebegin "Mounting misc binary format filesystem" mount -t binfmt_misc -o nodev,noexec,nosuid \ diff --git a/init.d/sysfs.in b/init.d/sysfs.in index 6929810..87adacd 100644 --- a/init.d/sysfs.in +++ b/init.d/sysfs.in @@ -15,6 +15,7 @@ sysfs_opts=nodev,noexec,nosuid depend() { + want modules keyword -docker -lxc -prefix -systemd-nspawn -vserver } @@ -102,7 +103,10 @@ mount_misc() # it will NOT appear in /proc/filesystems yet if [ -d /sys/firmware/efi/efivars ] \ && ! mountinfo -q /sys/firmware/efi/efivars; then - modprobe -q efivarfs + if modprobe -q efivarfs; then + ewarn "The efivarfs module needs to be configured in \ + @SYSCONFDIR@/conf.d/modules or built in" + fi if grep -qs efivarfs /proc/filesystems; then ebegin "Mounting efivarfs filesystem" mount -n -t efivarfs -o ${sysfs_opts} \