OpenRC: improve shutdown sequence, by avoiding unmounting some fs.

This commit is contained in:
Juan RP 2011-05-20 14:26:10 +02:00
parent 070ecb37b7
commit c86e824b9b
2 changed files with 37 additions and 15 deletions

View file

@ -156,17 +156,6 @@ xbps changes:
fi
# Clean up /tmp directories
--- init.d/localmount.in.orig 2011-04-29 17:06:22.273007691 +0200
+++ init.d/localmount.in 2011-04-29 17:06:50.247007699 +0200
@@ -49,7 +49,7 @@ stop()
fi
if [ "$RC_UNAME" = Linux ]; then
- no_umounts_r="$no_umounts_r|/proc|/proc/.*|/sys|/sys/.*"
+ no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*"
fi
no_umounts_r="^($no_umounts_r)$"
--- init.d/devfs.in.orig 2011-02-10 06:15:24.000000000 +0100
+++ init.d/devfs.in 2011-04-29 18:12:48.983999871 +0200
@@ -13,7 +13,6 @@ start() {
@ -238,7 +227,7 @@ xbps changes:
- if [ $? -eq 0 ]; then
- svcdir_restorecon
- [ $? -eq 0 ] && return 0
+ for d in init.d pid udev; do
+ for d in init.d udev; do
+ mkdir -m0755 /run/${d}
+ done
+ for d in lock tmp shm; do
@ -252,3 +241,34 @@ xbps changes:
fi
}
--- init.d/localmount.in.orig 2011-02-10 06:15:24.000000000 +0100
+++ init.d/localmount.in 2011-05-20 09:44:24.445841901 +0200
@@ -34,7 +34,7 @@ start()
stop()
{
# We never unmount / or /dev or $RC_SVCDIR
- local x= no_umounts_r="/|/dev|/dev/.*|${RC_SVCDIR}"
+ local x= no_umounts_r="/|/dev|/dev/.*"
no_umounts_r="${no_umounts_r}|/bin|/sbin|/lib|/libexec"
# RC_NO_UMOUNTS is an env var that can be set by plugins
OIFS=$IFS SIFS=${IFS-y}
@@ -49,7 +49,7 @@ stop()
fi
if [ "$RC_UNAME" = Linux ]; then
- no_umounts_r="$no_umounts_r|/proc|/proc/.*|/sys|/sys/.*"
+ no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*|/cow|/rofs|/cdrom"
fi
no_umounts_r="^($no_umounts_r)$"
--- init.d/mount-ro.in.orig 2011-05-20 09:45:08.199841890 +0200
+++ init.d/mount-ro.in 2011-05-20 09:45:33.285841883 +0200
@@ -19,7 +19,7 @@ start()
# We need the do_unmount function
. "$RC_LIBEXECDIR"/sh/rc-mount.sh
eindent
- local m="/dev|/dev/.*|/proc|/proc.*|/sys|/sys/.*|${RC_SVCDIR}" x= fs=
+ local m="/dev|/dev/.*|/proc|/proc.*|/sys|/sys/.*|/run|/cow|/rofs|/cdrom" x= fs=
m="$m|/bin|/sbin|/lib|/libexec"
# RC_NO_UMOUNTS is an env var that can be set by plugins
local OIFS=$IFS SIFS=${IFS-y} IFS=$IFS