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: Tue, 26 Apr 2016 20:00:17
Message-Id: 1461692630.fd80b6fc67ec6a0fe4853167fb67ee40bb51b742.williamh@OpenRC
1 commit: fd80b6fc67ec6a0fe4853167fb67ee40bb51b742
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Tue Apr 26 17:43:50 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 17:43:50 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=fd80b6fc
7
8 localmount/netmount: clean up critical mount processing
9
10 Fix a typo and do not fail if a path in critical_mounts is not listed as
11 a critical mount does not get mounted.
12
13 init.d/localmount.in | 8 ++++++--
14 init.d/netmount.in | 8 ++++++--
15 2 files changed, 12 insertions(+), 4 deletions(-)
16
17 diff --git a/init.d/localmount.in b/init.d/localmount.in
18 index 96ccc44..b7de0d8 100644
19 --- a/init.d/localmount.in
20 +++ b/init.d/localmount.in
21 @@ -41,9 +41,13 @@ start()
22 rc=0
23 else
24 for x in ${critical_mounts}; do
25 - mountinfo -q $x || critical=x
26 + fstabinfo -q $x || continue
27 + if ! mountinfo -q $x; then
28 + critical=x
29 + eerror "Failed to mount $x"
30 + fi
31 done
32 - [-z "$critical" ] && rc=0
33 + [ -z "$critical" ] && rc=0
34 fi
35 return $rc
36 }
37
38 diff --git a/init.d/netmount.in b/init.d/netmount.in
39 index 0febde2..ede4d32 100644
40 --- a/init.d/netmount.in
41 +++ b/init.d/netmount.in
42 @@ -46,9 +46,13 @@ start()
43 rc=0
44 else
45 for x in ${critical_mounts}; do
46 - mountinfo -q $x || critical=x
47 + fstabinfo -q $x || continue
48 + if ! mountinfo -q $x; then
49 + critical=x
50 + eerror "Failed to mount $x"
51 + fi
52 done
53 - [-z "$critical" ] && rc=0
54 + [ -z "$critical" ] && rc=0
55 fi
56 return $rc
57 }