summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/baselayout/files/baselayout-1.12.7-halt.patch')
-rw-r--r--sys-apps/baselayout/files/baselayout-1.12.7-halt.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-apps/baselayout/files/baselayout-1.12.7-halt.patch b/sys-apps/baselayout/files/baselayout-1.12.7-halt.patch
new file mode 100644
index 000000000000..398a050a8fff
--- /dev/null
+++ b/sys-apps/baselayout/files/baselayout-1.12.7-halt.patch
@@ -0,0 +1,29 @@
+--- init.d/halt.sh (revision 2421)
++++ init.d/halt.sh (working copy)
+@@ -106,6 +106,11 @@
+ continue
+ fi
+
++ # If we're using the mount (probably /usr) then don't unmount us
++ if [[ " $(fuser -m "${x}" 2>/dev/null) " == *" $$ "* ]] ; then
++ continue
++ fi
++
+ if ! umount "${x}" &>/dev/null; then
+ # Kill processes still using this mount
+ /bin/fuser -s -k -9 -m "${x}"
+@@ -156,9 +161,13 @@
+
+ for x in $(awk '{print $2}' /proc/mounts | sort -ur) ; do
+ x=${x//\\040/ }
+- if [[ -n $(echo "${x}" | egrep "${RC_NO_UMOUNTS}") ]] ; then
++
++ # Do not umount these ... will be different depending on value of CDBOOT
++ if [[ ${x} != "/" \
++ && -n $(echo "${x}" | egrep "${RC_NO_UMOUNTS}") ]] ; then
+ continue
+ fi
++
+ if [[ ${cmd} == "u" ]]; then
+ umount -n -r "${x}"
+ else