commit:     1f0441e0c5ca75b7593ae57987770567054c29e2
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Jan 19 18:32:56 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jan 19 19:01:07 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1f0441e0

localmount: Allow users to control whether errors are ignored

 conf.d/localmount    | 6 ++++++
 init.d/localmount.in | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/conf.d/localmount b/conf.d/localmount
index e3361da..397e8cd 100644
--- a/conf.d/localmount
+++ b/conf.d/localmount
@@ -1,3 +1,9 @@
 # Stop the unmounting of certain points.
 # This could be useful for some NFS related work.
 #no_umounts="/dir1:/var/dir2"
+#
+# Ignore errors when mounting local file systems.
+# This should be left alone unless you know what you are doing. If it is
+# set to yes, not only will we allow mount failures, but we will ignore
+# syntax errors in fstab.
+#ignore_mount_errors="NO"

diff --git a/init.d/localmount.in b/init.d/localmount.in
index a2b7a8a..cfc841a 100644
--- a/init.d/localmount.in
+++ b/init.d/localmount.in
@@ -39,6 +39,11 @@ start()
        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
+               rc=0
        fi
        return $rc
 }

Reply via email to