[Initscripts-ng-commits] r744 - in /trunk/src/insserv/debian: changelog patches/00list patches/62_default_stop_no_defaults.dpatch run-testsuite
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Mon May 19 12:15:40 UTC 2008
Author: kelmo-guest
Date: Mon May 19 12:15:40 2008
New Revision: 744
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=744
Log:
* Add test_broken_header() test case to show it seems possible to insert a
script missing Required-{Start,Stop} lsb info fields.
* Add test_no_default_start() to show that it seems possible to insert script
missing Default-Start field.
* Add test_no_default_stop() to show that it seems possible to insert script
missing Default-Stop field, and that links are created in stop runlevels.
Removed:
trunk/src/insserv/debian/patches/62_default_stop_no_defaults.dpatch
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/patches/00list
trunk/src/insserv/debian/run-testsuite
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=744&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Mon May 19 12:15:40 2008
@@ -24,12 +24,16 @@
* Add 61_default_stop_changed_from_empty to catch the case demonstrated by
test_adding_stop() and disallow overwritten initscript to create stop
links when none were present initially (Closes: #477415).
- * Add 62_default_stop_no_defaults to inhibit initscripts from being "given"
- default stop links when none are wanted.
* Add test_onlystart() test case to check we can insert scripts with empty
stop runlevel configuration.
-
- -- Kel Modderman <kel at otaku42.de> Mon, 19 May 2008 08:56:42 +1000
+ * Add test_broken_header() test case to show it seems possible to insert a
+ script missing Required-{Start,Stop} lsb info fields.
+ * Add test_no_default_start() to show that it seems possible to insert script
+ missing Default-Start field.
+ * Add test_no_default_stop() to show that it seems possible to insert script
+ missing Default-Stop field, and that links are created in stop runlevels.
+
+ -- Kel Modderman <kel at otaku42.de> Mon, 19 May 2008 22:14:08 +1000
insserv (1.11.0-8) unstable; urgency=low
Modified: trunk/src/insserv/debian/patches/00list
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/00list?rev=744&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/00list (original)
+++ trunk/src/insserv/debian/patches/00list Mon May 19 12:15:40 2008
@@ -11,4 +11,3 @@
52_shutdown_links
60_disable_cfgfilter_stat
61_default_stop_changed_from_empty
-62_default_stop_no_defaults
Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=744&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Mon May 19 12:15:40 2008
@@ -1056,8 +1056,8 @@
echo
echo "info: test insertion of script requiring a virtual facility that doesn't exist"
echo
-rm -rf $initddir ${insconf}.d
-mkdir -p $initddir ${insconf}.d
+rm -rf $initddir
+mkdir -p $initddir
addscript dummy <<'EOF'
### BEGIN INIT INFO
@@ -1141,6 +1141,85 @@
check_order S factwo service
rm -rf ${insconf}.d
+}
+##########################################################################
+test_broken_header() {
+echo
+echo "info: test insertion of script missing Required-{Start,Stop} fields"
+echo
+rm -rf $initddir
+mkdir -p $initddir
+
+addscript badheader <<'EOF'
+### BEGIN INIT INFO
+# Provides: badheader
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+EOF
+
+insserv_reg badheader || true
+
+list_rclinks
+
+test_script_present 0 badheader
+test_script_present 1 badheader
+test_script_present 2 badheader
+test_script_present 3 badheader
+test_script_present 4 badheader
+test_script_present 5 badheader
+test_script_present 6 badheader
+}
+##########################################################################
+test_no_default_start() {
+echo
+echo "info: test insertion of script missing Default-Start field"
+echo
+rm -rf $initddir
+mkdir -p $initddir
+
+addscript nodefstart <<'EOF'
+### BEGIN INIT INFO
+# Provides: nodefstart
+# Required-Start:
+# Required-Stop:
+# Default-Stop: 0 6
+### END INIT INFO
+EOF
+
+insserv_reg nodefstart || true
+
+list_rclinks
+
+check_script_not_present 2 nodefstart
+check_script_not_present 3 nodefstart
+check_script_not_present 4 nodefstart
+check_script_not_present 5 nodefstart
+}
+##########################################################################
+test_no_default_stop() {
+echo
+echo "info: test insertion of script missing Default-Stop field"
+echo
+rm -rf $initddir
+mkdir -p $initddir
+
+addscript nodefstop <<'EOF'
+### BEGIN INIT INFO
+# Provides: nodefstop
+# Required-Start:
+# Required-Stop:
+# Default-Start: 2 3 4 5
+### END INIT INFO
+EOF
+
+insserv_reg nodefstop || true
+
+list_rclinks
+
+check_script_not_present 0 nodefstop
+check_script_not_present 1 nodefstop
+check_script_not_present 6 nodefstop
}
##########################################################################
@@ -1165,3 +1244,6 @@
test_duplicate_provides
test_bogus_facility
test_insserv_conf_d
+test_broken_header
+test_no_default_start
+test_no_default_stop
More information about the Initscripts-ng-commits
mailing list