commit:     b652752339690e10a55ae50d046f4cf2a98daf1a
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Aug 21 00:01:23 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Aug 21 17:21:31 2015 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b6527523

Make localmount and netmount always succeed on non-linux

 init.d/localmount.in | 9 ++++++++-
 init.d/netmount.in   | 6 ++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/init.d/localmount.in b/init.d/localmount.in
index 9d05ebc..7b94790 100644
--- a/init.d/localmount.in
+++ b/init.d/localmount.in
@@ -15,7 +15,7 @@ depend()
 start()
 {
        # Mount local filesystems in /etc/fstab.
-       local types="noproc" x=
+       local types="noproc" x= rc=
        for x in $net_fs_list $extra_net_fs_list; do
                types="${types},no${x}"
        done
@@ -28,6 +28,13 @@ start()
        ebegin "Mounting local filesystems"
        mount -at "$types"
        eend $? "Some local filesystem failed to mount"
+       rc=$?
+       if [ "$RC_UNAME" != Linux ]; then
+               rc=0
+       elif [ "$rc" = 64 ]; then
+               rc=0
+       fi
+       return $rc
 }
 
 stop()

diff --git a/init.d/netmount.in b/init.d/netmount.in
index 99db185..9f8537d 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -23,6 +23,12 @@ start()
        mount -at $fs
        rc=$?
        ewend $rc "Could not mount all network filesystems"
+       if [ "$RC_UNAME" != Linux ]; then
+               rc=0
+       elif [ "$rc" = 64 ]; then
+               rc=0
+       fi
+       return $rc
 }
 
 stop()

Reply via email to