[Initscripts-ng-commits] r437 - in /trunk/src/insserv/debian: changelog run-testsuite

pere at users.alioth.debian.org pere at users.alioth.debian.org
Fri Jan 4 10:46:16 UTC 2008


Author: pere
Date: Fri Jan  4 10:46:16 2008
New Revision: 437

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=437
Log:
  * Add test to check and verify that override files in
    /etc/insserv/override replaces headers in the scripts in
    /etc/init.d/, and made previously failing loop breaking test
    fatal, as it is working with the fixed override patch.

Modified:
    trunk/src/insserv/debian/changelog
    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=437&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Fri Jan  4 10:46:16 2008
@@ -5,6 +5,10 @@
   * Update patch 21_overrides to fix bug in override handling.  Now a
     available header in a script or override file complete replaces
     previously loaded headers.
+  * Add test to check and verify that override files in
+    /etc/insserv/override replaces headers in the scripts in
+    /etc/init.d/, and made previously failing loop breaking test
+    fatal, as it is working with the fixed override patch.
 
  -- Petter Reinholdtsen <pere at debian.org>  Fri,  4 Jan 2008 01:38:00 +0100
 

Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=437&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Fri Jan  4 10:46:16 2008
@@ -351,11 +351,58 @@
 check_order 6 umountroot kexec
 check_order 6 kexec reboot
 
+echo
+echo "info: test if override files replace headers in the file"
+echo
 rm -rf $initddir
+mkdir -p $initddir
+
+# Two scripts with a loop between them
+insertscript base <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          base
+# Required-Start:
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+insertscript mover <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          mover
+# Required-Start:    base
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+check_order S base mover
+
+mkdir -p $overridedir
+cat <<'EOF' > $overridedir/mover
+### BEGIN INIT INFO
+# Provides:          mover
+# Required-Start:
+# Required-Stop:
+# X-Start-Before:    base
+# Default-Start:     S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+insserv_reg mover
+
+(cd $tmpdir && ls *)
+
+# Make sure the override file moved mover before base
+check_order S mover base
 
 echo
 echo "info: testing to insert scripts with a loop"
 echo
+rm -rf $initddir
 mkdir -p $initddir
 
 # Two scripts with a loop between them
@@ -394,8 +441,7 @@
 insserv_reg loop1 || true
 insserv_reg loop2 || true
 
-# XXX This do not work yet, as the override file seem to be ignored
-test_order S loop1 loop2
+check_order S loop1 loop2
 
 # Test fake loop.  The loop is in the combined start and stop
 # sequence.  There is no loop in the start sequence, and no loop in




More information about the Initscripts-ng-commits mailing list