aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2016-04-15 11:30:44 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2016-04-15 11:30:44 -0500
commit1c3c2cf6d8cb060d03919297f5fe706f6027a4c6 (patch)
treec41fdbb027100f142b36042d038a5d8451327296
parent171e856ec8a0a64504b4b4a47ab6181d37fc3dbe (diff)
netmount: fix mounting on Linux
Before this commit, on Linux, we were always trying to mount file systems marked with _netdev, even when the previous mount command failed. Now, we do not run the second mount if the first fails. X-Gentoo-Bug: 579876 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=579876
-rw-r--r--init.d/netmount.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.d/netmount.in b/init.d/netmount.in
index 0acf15ea..f7237f13 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -37,7 +37,7 @@ start()
ebegin "Mounting network filesystems"
mount -at $fs
rc=$?
- if [ "$RC_UNAME" = Linux ]; then
+ if [ "$RC_UNAME" = Linux ] && [ $rc = 0 ]; then
mount -a -O _netdev
rc=$?
fi
@@ -72,7 +72,7 @@ stop()
retval=$?
eoutdent
- if [ "$RC_UNAME" = Linux ]; then
+ if [ "$RC_UNAME" = Linux ] && [ $retval = 0 ]; then
umount -a -O _netdev
retval=$?
fi