[Pkg-sysvinit-commits] r258 - in sysvinit/trunk/debian: .
initscripts initscripts/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Thu Nov 24 19:36:55 UTC 2005
Author: jdthood-guest
Date: 2005-11-24 19:36:54 +0000 (Thu, 24 Nov 2005)
New Revision: 258
Added:
sysvinit/trunk/debian/initscripts/etc/init.d/killall5
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/single
sysvinit/trunk/debian/initscripts/postinst
Log:
Split killall5 out of single
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2005-11-24 18:04:53 UTC (rev 257)
+++ sysvinit/trunk/debian/changelog 2005-11-24 19:36:54 UTC (rev 258)
@@ -41,6 +41,10 @@
* update-rc.d.8: Mention that update-rc.d will not create multiple start
or multiple stop symlinks for a service in a single runlevel directory.
(Closes: #330155)
+ * Split /etc/rc1.d/20single into /etc/rc1.d/S20killall5 and
+ /etc/rc1.d/S99single so that packages can insert scripts to do
+ things between the "killall5" and the "exec init -t1 S".
+ This addresses #145280.
* Remove unneeded sysvinit Dependency on coreutils (Closes: #316423)
* Clean up indentation and formatting of all initscripts
Added: sysvinit/trunk/debian/initscripts/etc/init.d/killall5
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/killall5 2005-11-24 18:04:53 UTC (rev 257)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/killall5 2005-11-24 19:36:54 UTC (rev 258)
@@ -0,0 +1,51 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: killall5
+# Required-Start: $local_fs
+# Required-Stop:
+# Default-Start: 1
+# Default-Stop:
+# Short-Description: executed by init(8) upon entering runlevel 1 (single).
+### END INIT INFO
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+
+. /lib/lsb/init-functions
+
+do_start () {
+ # Kill all processes.
+ log_action_begin_msg "Sending all processes the TERM signal"
+ killall5 -15
+ log_action_end_msg 0
+ sleep 5
+ log_action_begin_msg "Sending all processes the KILL signal"
+ killall5 -9
+ log_action_end_msg 0
+
+ # We start update here, since we just killed it.
+ if [ -x /sbin/update ] && [ `uname -s` = Linux ]
+ then
+ case `uname -r` in
+ 0.*|1.*|2.[0123].*)
+ update
+ ;;
+ esac
+ fi
+}
+
+case "$1" in
+ start)
+ do_start
+ ;;
+ restart|reload|force-reload)
+ echo "Error: argument '$1' not supported" >&2
+ exit 3
+ ;;
+ stop)
+ # No-op
+ ;;
+ *)
+ echo "Usage: $0 start|stop" >&2
+ exit 3
+ ;;
+esac
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/single
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/single 2005-11-24 18:04:53 UTC (rev 257)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/single 2005-11-24 19:36:54 UTC (rev 258)
@@ -1,37 +1,18 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: single
-# Required-Start: $local_fs
+# Required-Start: $local_fs killall5
# Required-Stop:
# Default-Start: 1
# Default-Stop:
# Short-Description: executed by init(8) upon entering runlevel 1 (single).
### END INIT INFO
-PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+PATH="/sbin:/bin"
. /lib/lsb/init-functions
do_start () {
- # Kill all processes.
- log_action_begin_msg "Sending all processes the TERM signal"
- killall5 -15
- log_action_end_msg 0
- sleep 5
- log_action_begin_msg "Sending all processes the KILL signal"
- killall5 -9
- log_action_end_msg 0
-
- # We start update here, since we just killed it.
- if [ -x /sbin/update ] && [ `uname -s` = Linux ]
- then
- case `uname -r` in
- 0.*|1.*|2.[0123].*)
- update
- ;;
- esac
- fi
-
log_action_msg "Will now switch to single-user mode"
exec init -t1 S
}
Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst 2005-11-24 18:04:53 UTC (rev 257)
+++ sysvinit/trunk/debian/initscripts/postinst 2005-11-24 19:36:54 UTC (rev 258)
@@ -150,7 +150,8 @@
updatercd halt start 90 0 .
updatercd reboot start 90 6 .
updatercd rmnologin start 99 2 3 4 5 .
-updatercd single start 20 1 .
+updatercd killall5 start 20 1 .
+updatercd single start 99 1 .
updatercd stop-bootlogd start 99 2 3 4 5 .
#
More information about the Pkg-sysvinit-commits
mailing list