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
This commit is contained in:
William Hubbs 2016-04-15 11:30:44 -05:00
parent 171e856ec8
commit 1c3c2cf6d8

View File

@ -37,7 +37,7 @@ start()
ebegin "Mounting network filesystems" ebegin "Mounting network filesystems"
mount -at $fs mount -at $fs
rc=$? rc=$?
if [ "$RC_UNAME" = Linux ]; then if [ "$RC_UNAME" = Linux ] && [ $rc = 0 ]; then
mount -a -O _netdev mount -a -O _netdev
rc=$? rc=$?
fi fi
@ -72,7 +72,7 @@ stop()
retval=$? retval=$?
eoutdent eoutdent
if [ "$RC_UNAME" = Linux ]; then if [ "$RC_UNAME" = Linux ] && [ $retval = 0 ]; then
umount -a -O _netdev umount -a -O _netdev
retval=$? retval=$?
fi fi