[Lunar-commits] <moonbase> sysvinit: kill processes *before* unmounting
Paul Bredbury
brebs at lunar-linux.org
Fri Aug 28 09:21:16 CEST 2009
commit 9f0154f969d184848d9f9a678facab7be25bbe48
Author: Paul Bredbury <brebs at lunar-linux.org>
Date: Fri Aug 28 14:21:16 2009 +0700
sysvinit: kill processes *before* unmounting
/etc/init.d/signals was being run after unmounting, rather than before, thus occasionally preventing a clean shutdown.
---
utils/sysvinit/BUILD | 30 ++++++++++++++++--------------
utils/sysvinit/DETAILS | 7 ++++---
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/utils/sysvinit/BUILD b/utils/sysvinit/BUILD
index 8a137f3..ba78b4c 100644
--- a/utils/sysvinit/BUILD
+++ b/utils/sysvinit/BUILD
@@ -3,30 +3,32 @@
make -C src &&
prepare_install &&
make -C src install &&
- install -m0755 $SCRIPT_DIRECTORY/service /sbin/service &&
- mkdir -p /etc/rc{S,0,1,2,3,4,5,6}.d /etc/init.d /var/{run,log} ||
- # error out here in case of failure
- exit 1
+ install -m0755 $SCRIPT_DIRECTORY/service /sbin/service &&
+ mkdir -p /etc/rc{S,0,1,2,3,4,5,6}.d /etc/init.d /var/{run,log} &&
# the rest should be safe now:
if [ ! -e /etc/inittab ] ; then
install -m0600 $SCRIPT_DIRECTORY/inittab /etc/
- fi
+ fi &&
for SCRIPT in halt rc rcS reboot signals bootmisc ; do
if [ ! -e /etc/init.d/$SCRIPT ] ; then
install -m0700 $SCRIPT_DIRECTORY/init.d/$SCRIPT /etc/init.d/
fi
- done
-
- ln -sf ../init.d/signals /etc/rc0.d/S80signals
- ln -sf ../init.d/halt /etc/rc0.d/S90halt
- ln -sf ../init.d/bootmisc /etc/rcS.d/S99bootmisc
- ln -sf ../init.d/signals /etc/rc6.d/S80signals
- ln -sf ../init.d/reboot /etc/rc6.d/S90reboot
+ done &&
+
+ # K98signals terminates apps, before K99mount performs unmounting
+ ln -sf ../init.d/signals /etc/rc0.d/K98signals &&
+ ln -sf ../init.d/halt /etc/rc0.d/S90halt &&
+ ln -sf ../init.d/bootmisc /etc/rcS.d/S99bootmisc &&
+ ln -sf ../init.d/signals /etc/rc6.d/K98signals &&
+ ln -sf ../init.d/reboot /etc/rc6.d/S90reboot &&
+
+ # Remove old symlinks
+ rm -f /etc/rc{0,6}.d/S80signals &&
- touch /var/run/utmp /var/log/{w,b}tmp /var/log/lastlog
- chmod 644 /var/run/utmp /var/log/wtmp /var/log/lastlog
+ touch /var/run/utmp /var/log/{w,b}tmp /var/log/lastlog &&
+ chmod 644 /var/run/utmp /var/log/wtmp /var/log/lastlog &&
chmod 600 /var/log/btmp
) > $C_FIFO 2>&1
diff --git a/utils/sysvinit/DETAILS b/utils/sysvinit/DETAILS
index 411b514..fac3bde 100644
--- a/utils/sysvinit/DETAILS
+++ b/utils/sysvinit/DETAILS
@@ -5,12 +5,13 @@
SOURCE_VFY=sha1:3e78df609a2ff0fea6304cb662a7f10298d03667
WEB_SITE=ftp://ftp.cistron.nl/pub/people/miquels/sysvinit
ENTERED=20010922
- UPDATED=20070304
- SHORT="parent process of all process."
+ UPDATED=20090828
+ SHORT="parent process of all processes"
+
cat << EOF
sysvinit
Init is the parent of all processes. Its primary role is to create
processes from a script stored in the file /etc/inittab. This package
-also contains well known and used utilities like reboot, shutdown,
+also contains well-known and used utilities like reboot, shutdown,
killall, poweroff, tellinit, sulogin, wall, etc.
EOF
More information about the Lunar-commits
mailing list