Hi.  Is the proposed patch ok?  Do blktrace really need to start
before single user mode is entered?  If not, it would be better to not
start from rcS.d/ and instead start in runlevels 2-5.  To improve
single user mode in Debian, as many scripts as possible should be
moved from rcS.d/ to runlevels 2-5.  Why is the script running in
runlevel 1, which is intended to be similar to single user mode?

Are there some other scripts that need to start after the debug file
system is mounted?  If this the case, it would be required to make
sure these scripts depend on mountdebugfs.

If this is the case, this patch would be better.  In addition to
fixing the header for new installations, it make sure to fix existing
installation to run the script in runlevels 2-5.

diff -urN blktrace-1.0.1/debian/blktrace.mountdebugfs.init 
blktrace-1.0.1-pere/debian/blktrace.mountdebugfs.init
--- blktrace-1.0.1/debian/blktrace.mountdebugfs.init    2010-03-22 
18:52:42.000000000 +0100
+++ blktrace-1.0.1-pere/debian/blktrace.mountdebugfs.init       2010-03-22 
18:48:48.000000000 +0100
@@ -10,7 +10,7 @@
 # Required-Stop:     $local_fs
 # Should-Start:
 # Should-Stop:
-# Default-Start:     S 1 2 3 4 5
+# Default-Start:     2 3 4 5
 # Default-Stop:      0 6
 # Short-Description: Mount debugfs on /sys/kernel/debug
 ### END INIT INFO
diff -urN blktrace-1.0.1/debian/postinst blktrace-1.0.1-pere/debian/postinst
--- blktrace-1.0.1/debian/postinst      1970-01-01 01:00:00.000000000 +0100
+++ blktrace-1.0.1-pere/debian/postinst 2010-03-22 18:52:24.000000000 +0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# update init script symlinks for new runlevels and priorities for upgrades
+# from older versions
+if [ "$1" = configure ] && dpkg --compare-versions "$2" le 1.0.1-2;  then
+    echo "Reinstalling init script for new runlevels and priorities ..." >&2
+    # remove old init script symlinks; dh_installinit adds the proper
+    # update-rc.d snippet later on
+    update-rc.d -f mountdebugfs remove >/dev/null
+fi
+
+#DEBHELPER#
diff -urN blktrace-1.0.1/debian/rules blktrace-1.0.1-pere/debian/rules
--- blktrace-1.0.1/debian/rules 2010-03-22 18:52:42.000000000 +0100
+++ blktrace-1.0.1-pere/debian/rules    2010-03-22 18:50:00.000000000 +0100
@@ -137,7 +137,7 @@
        dh_installchangelogs
        dh_installdocs
        dh_installinit --name=mountdebugfs --no-restart-on-upgrade \
-               --update-rcd-params="start 90 S . stop 21 0 6 ."
+               --update-rcd-params="start 20 2 3 4 5 . stop 21 0 6 ."
        dh_link
        dh_strip
        dh_compress -X.pdf


Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to