From 5257ba51b9524b101533308024862e4344c8b6f6 Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Wed, 11 Jul 2007 17:27:46 +0000
Subject: Don't unmount network filesystems in localmount or halt.sh, #175602.

---
 init.d/localmount | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'init.d/localmount')

diff --git a/init.d/localmount b/init.d/localmount
index bf12638b..18d84a91 100755
--- a/init.d/localmount
+++ b/init.d/localmount
@@ -202,10 +202,16 @@ stop() {
 	do_unmount "umount -d" "${no_umounts}" "^/dev/loop"
 	eoutdent
 
-	# Now everything else
+	# Now everything else, except network filesystems as the
+	# network should be down by this point.
 	einfo "Unmounting filesystems"
 	eindent
-	do_unmount "umount" "${no_umounts}"
+	local fs=
+	for x in ${RC_NET_FS_LIST} ; do
+		fs="${fs}${fs:+|}${x}"
+	done
+	[ -n "${fs}" ] && fs="^(${fs})$"
+	do_unmount "umount" "${no_umounts}" "" "" "${fs}"
 	eoutdent
 
 	return 0
-- 
cgit v1.2.3