aboutsummaryrefslogtreecommitdiff
path: root/init.d/netmount.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2016-04-25 12:04:34 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2016-04-25 12:04:34 -0500
commit5d130cc45cd334fd38b0c6874bcc81ac74636217 (patch)
tree40f781a56f236012675f066e8f75a28788c1c4bb /init.d/netmount.in
parent1c3c2cf6d8cb060d03919297f5fe706f6027a4c6 (diff)
localmount/netmount: allow mount points to be marked critical
In previous releases, we either treated no mount points as critical or all of them. Now both localmount and netmount support a critical_mounts setting. If mount points listed in this setting fail to mount, localmount and netmount will fail.
Diffstat (limited to 'init.d/netmount.in')
-rw-r--r--init.d/netmount.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/init.d/netmount.in b/init.d/netmount.in
index f7237f13..0febde2a 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -42,8 +42,13 @@ start()
rc=$?
fi
ewend $rc "Could not mount all network filesystems"
- if [ "$RC_UNAME" != Linux ]; then
+ if [ -z "$critical_mounts" ]; then
rc=0
+ else
+ for x in ${critical_mounts}; do
+ mountinfo -q $x || critical=x
+ done
+ [-z "$critical" ] && rc=0
fi
return $rc
}