Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, /
Date: Thu, 01 Oct 2015 22:37:10
Message-Id: 1443738823.dac5966ca40610797d2b2aabef17154ca3dc20af.williamh@OpenRC
1 commit: dac5966ca40610797d2b2aabef17154ca3dc20af
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Thu Oct 1 22:16:14 2015 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 1 22:33:43 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=dac5966c
7
8 Revert "local/netmount: remove uses of -O [no]_netdev"
9
10 This reverts commit 2a439c85bd69efc14847b4397bd6783cac051405.
11 There is another use case for -O involving iscsi, so we can't remove it.
12
13 BUSYBOX.md | 5 +++++
14 NEWS.md | 16 ++++------------
15 init.d/localmount.in | 5 +++--
16 init.d/netmount.in | 8 ++++++++
17 4 files changed, 20 insertions(+), 14 deletions(-)
18
19 diff --git a/BUSYBOX.md b/BUSYBOX.md
20 index 8d93356..db7ca51 100644
21 --- a/BUSYBOX.md
22 +++ b/BUSYBOX.md
23 @@ -12,6 +12,11 @@ configuration settings for best results with OpenRC.
24 CONFIG_START_STOP_DAEMON -- The start-stop-daemon applet is not compatible with
25 start-stop-daemon in OpenRC.
26
27 +CONFIG_MOUNT -- The mount applet does not support the -O [no]_netdev options to
28 +skip over or include network file systems when the -a option is present.
29 +
30 +CONFIG_UMOUNT -- The umount applet does not support the -O option along with -a.
31 +
32 CONFIG_SWAPONOFF -- The swapon applet does not support the -e option
33 or recognize the nofail option in fstab.
34
35
36 diff --git a/NEWS.md b/NEWS.md
37 index cb8eaba..819a340 100644
38 --- a/NEWS.md
39 +++ b/NEWS.md
40 @@ -5,23 +5,15 @@ the information in this file is in reverse order.
41
42 ## OpenRC-0.18
43
44 -The behaviour of localmount and netmount is changing. In the past, these
45 -services always started successfully. However, now they will fail if a
46 -file system they attempt to mount cannot be mounted.
47 -
48 -If you have file systems listed in fstab which should not be mounted at
49 +The behaviour of localmount and netmount in this version is changing. In
50 +the past, these services always started successfully. In this version,
51 +they will be able to fail if file systems they mount fail to mount. If
52 +you have file systems listed in fstab which should not be mounted at
53 boot time, make sure to add noauto to the mount options. If you have
54 file systems that you want to attempt to mount at boot time but failure
55 should be allowed, add nofail to the mount options for these file
56 systems in fstab.
57
58 -In this version, we are dropping the use of the -O switch for
59 -mount/umount -a. This is being dropped because it is util-linux
60 -specific and not compatible with busybox.
61 -
62 -This should not be a regression for Gentoo users, but I am publishing
63 -this here because it may be for others.
64 -
65 ## OpenRC-0.14
66
67 The binfmt service, which registers misc binary formats with the Linux
68
69 diff --git a/init.d/localmount.in b/init.d/localmount.in
70 index f4bf15f..29e7348 100644
71 --- a/init.d/localmount.in
72 +++ b/init.d/localmount.in
73 @@ -15,18 +15,19 @@ depend()
74 start()
75 {
76 # Mount local filesystems in /etc/fstab.
77 - local types="noproc" x= rc=
78 + local types="noproc" x= no_netdev= rc=
79 for x in $net_fs_list $extra_net_fs_list; do
80 types="${types},no${x}"
81 done
82
83 if [ "$RC_UNAME" = Linux ]; then
84 + no_netdev="-O no_netdev"
85 if mountinfo -q /usr; then
86 touch "$RC_SVCDIR"/usr_premounted
87 fi
88 fi
89 ebegin "Mounting local filesystems"
90 - mount -at "$types"
91 + mount -at "$types" $no_netdev
92 eend $? "Some local filesystem failed to mount"
93 rc=$?
94 if [ "$RC_UNAME" != Linux ]; then
95
96 diff --git a/init.d/netmount.in b/init.d/netmount.in
97 index d9cf9c5..d1f3cff 100644
98 --- a/init.d/netmount.in
99 +++ b/init.d/netmount.in
100 @@ -22,6 +22,10 @@ start()
101 ebegin "Mounting network filesystems"
102 mount -at $fs
103 rc=$?
104 + if [ "$RC_UNAME" = Linux ]; then
105 + mount -a -O _netdev
106 + rc=$?
107 + fi
108 ewend $rc "Could not mount all network filesystems"
109 if [ "$RC_UNAME" != Linux ]; then
110 rc=0
111 @@ -53,5 +57,9 @@ stop()
112 retval=$?
113
114 eoutdent
115 + if [ "$RC_UNAME" = Linux ]; then
116 + umount -a -O _netdev
117 + retval=$?
118 + fi
119 eend $retval "Failed to unmount network filesystems"
120 }