From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 44F531383E0 for ; Thu, 1 Oct 2015 22:37:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9FEABE0893; Thu, 1 Oct 2015 22:37:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3C20EE0893 for ; Thu, 1 Oct 2015 22:37:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F180A340821 for ; Thu, 1 Oct 2015 22:37:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 635F83E7 for ; Thu, 1 Oct 2015 22:37: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: <1443738823.dac5966ca40610797d2b2aabef17154ca3dc20af.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, / X-VCS-Repository: proj/openrc X-VCS-Files: BUSYBOX.md NEWS.md init.d/localmount.in init.d/netmount.in X-VCS-Directories: init.d/ / X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: dac5966ca40610797d2b2aabef17154ca3dc20af X-VCS-Branch: master Date: Thu, 1 Oct 2015 22:37: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: b23fa581-43af-4a4e-97a8-46a98b23586c X-Archives-Hash: a769dd55ba5fe13cbd2a3c9e48128f40 commit: dac5966ca40610797d2b2aabef17154ca3dc20af Author: William Hubbs gmail com> AuthorDate: Thu Oct 1 22:16:14 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Oct 1 22:33:43 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=dac5966c Revert "local/netmount: remove uses of -O [no]_netdev" This reverts commit 2a439c85bd69efc14847b4397bd6783cac051405. There is another use case for -O involving iscsi, so we can't remove it. BUSYBOX.md | 5 +++++ NEWS.md | 16 ++++------------ init.d/localmount.in | 5 +++-- init.d/netmount.in | 8 ++++++++ 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/BUSYBOX.md b/BUSYBOX.md index 8d93356..db7ca51 100644 --- a/BUSYBOX.md +++ b/BUSYBOX.md @@ -12,6 +12,11 @@ configuration settings for best results with OpenRC. CONFIG_START_STOP_DAEMON -- The start-stop-daemon applet is not compatible with start-stop-daemon in OpenRC. +CONFIG_MOUNT -- The mount applet does not support the -O [no]_netdev options to +skip over or include network file systems when the -a option is present. + +CONFIG_UMOUNT -- The umount applet does not support the -O option along with -a. + CONFIG_SWAPONOFF -- The swapon applet does not support the -e option or recognize the nofail option in fstab. diff --git a/NEWS.md b/NEWS.md index cb8eaba..819a340 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,23 +5,15 @@ the information in this file is in reverse order. ## OpenRC-0.18 -The behaviour of localmount and netmount is changing. In the past, these -services always started successfully. However, now they will fail if a -file system they attempt to mount cannot be mounted. - -If you have file systems listed in fstab which should not be mounted at +The behaviour of localmount and netmount in this version is changing. In +the past, these services always started successfully. In this version, +they will be able to fail if file systems they mount fail to mount. If +you have file systems listed in fstab which should not be mounted at boot time, make sure to add noauto to the mount options. If you have file systems that you want to attempt to mount at boot time but failure should be allowed, add nofail to the mount options for these file systems in fstab. -In this version, we are dropping the use of the -O switch for -mount/umount -a. This is being dropped because it is util-linux -specific and not compatible with busybox. - -This should not be a regression for Gentoo users, but I am publishing -this here because it may be for others. - ## OpenRC-0.14 The binfmt service, which registers misc binary formats with the Linux diff --git a/init.d/localmount.in b/init.d/localmount.in index f4bf15f..29e7348 100644 --- a/init.d/localmount.in +++ b/init.d/localmount.in @@ -15,18 +15,19 @@ depend() start() { # Mount local filesystems in /etc/fstab. - local types="noproc" x= rc= + local types="noproc" x= no_netdev= rc= for x in $net_fs_list $extra_net_fs_list; do types="${types},no${x}" done if [ "$RC_UNAME" = Linux ]; then + no_netdev="-O no_netdev" if mountinfo -q /usr; then touch "$RC_SVCDIR"/usr_premounted fi fi ebegin "Mounting local filesystems" - mount -at "$types" + mount -at "$types" $no_netdev eend $? "Some local filesystem failed to mount" rc=$? if [ "$RC_UNAME" != Linux ]; then diff --git a/init.d/netmount.in b/init.d/netmount.in index d9cf9c5..d1f3cff 100644 --- a/init.d/netmount.in +++ b/init.d/netmount.in @@ -22,6 +22,10 @@ start() ebegin "Mounting network filesystems" mount -at $fs rc=$? + if [ "$RC_UNAME" = Linux ]; then + mount -a -O _netdev + rc=$? + fi ewend $rc "Could not mount all network filesystems" if [ "$RC_UNAME" != Linux ]; then rc=0 @@ -53,5 +57,9 @@ stop() retval=$? eoutdent + if [ "$RC_UNAME" = Linux ]; then + umount -a -O _netdev + retval=$? + fi eend $retval "Failed to unmount network filesystems" }