diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2016-04-25 12:04:34 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2016-04-25 12:04:34 -0500 |
commit | 5d130cc45cd334fd38b0c6874bcc81ac74636217 (patch) | |
tree | 40f781a56f236012675f066e8f75a28788c1c4bb /init.d/localmount.in | |
parent | 1c3c2cf6d8cb060d03919297f5fe706f6027a4c6 (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/localmount.in')
-rw-r--r-- | init.d/localmount.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/init.d/localmount.in b/init.d/localmount.in index cfc841a7..96ccc44b 100644 --- a/init.d/localmount.in +++ b/init.d/localmount.in @@ -22,7 +22,7 @@ depend() start() { # Mount local filesystems in /etc/fstab. - local types="noproc" x= no_netdev= rc= + local critical= types="noproc" x= no_netdev= rc= for x in $net_fs_list $extra_net_fs_list; do types="${types},no${x}" done @@ -37,13 +37,13 @@ start() mount -at "$types" $no_netdev eend $? "Some local filesystem failed to mount" rc=$? - if [ "$RC_UNAME" != Linux ]; then - rc=0 - elif yesno "${ignore_mount_errors:-NO}"; then - if [ $rc -ne 0 ]; then - ewarn "localmount: errors detected, but ignored" - fi + 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 } |