[Pkg-sysvinit-commits] r281 - in sysvinit/trunk/debian: .
initscripts initscripts/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Fri Nov 25 19:09:09 UTC 2005
Author: jdthood-guest
Date: 2005-11-25 19:09:09 +0000 (Fri, 25 Nov 2005)
New Revision: 281
Added:
sysvinit/trunk/debian/initscripts/etc/init.d/stop-bootlogd
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/bootlogd
sysvinit/trunk/debian/initscripts/postinst
sysvinit/trunk/debian/initscripts/preinst
sysvinit/trunk/debian/rules
Log:
Make stop-bootlogd a distinct script
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2005-11-25 10:31:56 UTC (rev 280)
+++ sysvinit/trunk/debian/changelog 2005-11-25 19:09:09 UTC (rev 281)
@@ -45,6 +45,8 @@
/etc/rc1.d/S99single so that packages can insert scripts to do
things between the "killall5" in the former and the "exec init -t1 S"
in the latter. This addresses #145280.
+ * Make stop-bootlogd a distinct script rather than a symlink to bootlogd.
+ This allows us to give it a different LSB header.
* Remove unneeded sysvinit Dependency on coreutils (Closes: #316423)
* Clean up indentation and formatting of all initscripts
* 40_selinux: Remove extra printf argument
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/bootlogd
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/bootlogd 2005-11-25 10:31:56 UTC (rev 280)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/bootlogd 2005-11-25 19:09:09 UTC (rev 281)
@@ -4,7 +4,7 @@
# Required-Start: mountvirtfs
# Required-Stop:
# Default-Start: S
-# Default-Stop: 0 1 2 3 4 5 6
+# Default-Stop:
# Short-Description: Start bootlogd to log boot messages.
# Description: One of the first scripts to be executed. Starts or stops
# the bootlogd log program. If this script is called as
@@ -18,7 +18,7 @@
DESC="Bootlog daemon"
[ -r /etc/default/bootlogd ] && . /etc/default/bootlogd
-test -x "$DAEMON" || exit 0
+[ -x "$DAEMON" ] || exit 0
. /lib/lsb/init-functions
@@ -28,21 +28,24 @@
;;
esac
-
-STOPPER=
+# Previously this script was symlinked as "stop-bootlogd" which,
+# when run with the "start" argument, should stop bootlogd.
+# Now stop-bootlogd is a separate script, but for backward compatibility
+# this script must continue to implement the old behavior.
+AM_STOP_BOOTLOGD=
+SCRIPTNAME=${0##*/}
+SCRIPTNAME=${SCRIPTNAME#[SK]??}
ACTION="$1"
case "$0" in
*stop-bootlog*)
- STOPPER=Y
- if [ "$ACTION" = start ]
- then
- ACTION=stop
- fi
+ AM_STOP_BOOTLOGD=Y
+ [ "$ACTION" = start ] && ACTION=stop
;;
esac
case "$ACTION" in
start)
+ PATH=/sbin:/bin # No remote fs at start
log_daemon_msg "Starting $DESC" "$NAME"
if [ -d /proc/1/. ]
then
@@ -60,7 +63,7 @@
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --exec $DAEMON
ES=$?
- if [ "$STOPPER" ] && [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
+ if [ "$AM_STOP_BOOTLOGD" ] && [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
then
cd /var/log
chgrp adm boot
@@ -69,16 +72,14 @@
mv boot~ boot.0
fi
log_end_msg $ES
+ sleep 1
;;
restart|force-reload)
- sh $0 stop
- sleep 1
- sh $0 start
+ $0 stop
+ $0 start
;;
*)
- N=${0##*/}
- N=${N#[SK]??}
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
Added: sysvinit/trunk/debian/initscripts/etc/init.d/stop-bootlogd
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/stop-bootlogd 2005-11-25 10:31:56 UTC (rev 280)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/stop-bootlogd 2005-11-25 19:09:09 UTC (rev 281)
@@ -0,0 +1,25 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: stop-bootlogd
+# Required-Start: $remote_fs
+# Required-Stop:
+# Default-Start: 1 2 3 4 5
+# Default-Stop:
+# Short-Description: Stop bootlogd
+# Description: See the bootlogd script
+### END INIT INFO
+
+case "$1" in
+ start)
+ /etc/init.d/bootlogd stop
+ ;;
+ stop|restart|force-reload)
+ # No-op
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+exit 0
Property changes on: sysvinit/trunk/debian/initscripts/etc/init.d/stop-bootlogd
___________________________________________________________________
Name: svn:executable
+ *
Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst 2005-11-25 10:31:56 UTC (rev 280)
+++ sysvinit/trunk/debian/initscripts/postinst 2005-11-25 19:09:09 UTC (rev 281)
@@ -147,12 +147,12 @@
updatercd umountnfs.sh start 31 0 6 .
updatercd umountfs start 40 0 6 .
updatercd umountroot start 60 0 6 .
+updatercd killprocs start 30 1 .
+updatercd stop-bootlogd start 89 1 . start 99 2 3 4 5 .
updatercd halt start 90 0 .
updatercd reboot start 90 6 .
+updatercd single start 90 1 .
updatercd rmnologin start 99 2 3 4 5 .
-updatercd killprocs start 30 1 .
-updatercd single start 99 1 .
-updatercd stop-bootlogd start 99 2 3 4 5 .
#
# Remove scripts that were left behind by older glibc (<< 2.3.2.ds1-12)
Modified: sysvinit/trunk/debian/initscripts/preinst
===================================================================
--- sysvinit/trunk/debian/initscripts/preinst 2005-11-25 10:31:56 UTC (rev 280)
+++ sysvinit/trunk/debian/initscripts/preinst 2005-11-25 19:09:09 UTC (rev 281)
@@ -9,11 +9,14 @@
#
case "$1" in
- install|upgrade)
- ;;
- abort-upgrade)
- exit 0
- ;;
+ install|upgrade)
+ # /etc/init.d/stop-bootlogd used to be a symlink to bootlogd
+ # Now it is a separate script
+ [ -L /etc/init.d/stop-bootlogd ] && rm -f /etc/init.d/stop-bootlogd
+ ;;
+ abort-upgrade)
+ exit 0
+ ;;
esac
umask 022
Modified: sysvinit/trunk/debian/rules
===================================================================
--- sysvinit/trunk/debian/rules 2005-11-25 10:31:56 UTC (rev 280)
+++ sysvinit/trunk/debian/rules 2005-11-25 19:09:09 UTC (rev 281)
@@ -115,7 +115,6 @@
cp -af debian/initscripts/share/* $(tmp)/usr/share/initscripts
cp -af debian/initscripts/etc/* $(tmp)/etc
cp -af debian/initscripts/lib/* $(tmp)/lib
- ln -sf bootlogd $(tmp)/etc/init.d/stop-bootlogd
chmod 755 $(tmp)/etc/init.d/[a-z]*
chmod 644 $(tmp)/etc/init.d/bootclean.sh
chmod 644 $(tmp)/lib/init/functions.sh $(tmp)/lib/init/set-rcS-vars.sh
More information about the Pkg-sysvinit-commits
mailing list