From 7341cd882fba522c1f1d183603334839bd4df7fc Mon Sep 17 00:00:00 2001
From: William Hubbs <w.d.hubbs@gmail.com>
Date: Mon, 10 Aug 2015 18:45:36 -0500
Subject: [PATCH] allow localmount and netmount to fail

---
 NEWS.md              | 11 +++++++++++
 init.d/localmount.in |  3 ---
 init.d/netmount.in   |  1 -
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 20e3c272..69fab7ff 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,6 +3,17 @@
 This file will contain a list of notable changes for each release. Note
 the information in this file is in reverse order.
 
+## OpenRC-x.xx
+
+The behaviour of localmount and netmount in this version is changing. In
+the past, these services always started successfully. In this version,
+they will be able to fail if file systems they mount fail to mount. If
+you have file systems listed in fstab which should not be mounted at
+boot time, make sure to add noauto to the mount options. If you have
+file systems that you want to attempt to mount at boot time but failure
+should be allowed, add nofail to the mount options for these file
+systems in fstab.
+
 ## OpenRC-0.14
 
 The binfmt service, which registers misc binary formats with the Linux
diff --git a/init.d/localmount.in b/init.d/localmount.in
index b2e8ef17..67e43035 100644
--- a/init.d/localmount.in
+++ b/init.d/localmount.in
@@ -29,9 +29,6 @@ start()
 	ebegin "Mounting local filesystems"
 	mount -at "$types" $no_netdev
 	eend $? "Some local filesystem failed to mount"
-
-	# Always return 0 - some local mounts may not be critical for boot
-	return 0
 }
 
 stop()
diff --git a/init.d/netmount.in b/init.d/netmount.in
index 66ba4090..2ce5c2a9 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -27,7 +27,6 @@ start()
 		rc=$?
 	fi
 	ewend $rc "Could not mount all network filesystems"
-	return 0
 }
 
 stop()