[Initscripts-ng-commits] r365 - /trunk/src/insserv/debian/run-testsuite

pere at users.alioth.debian.org pere at users.alioth.debian.org
Mon Dec 31 00:46:51 UTC 2007


Author: pere
Date: Mon Dec 31 00:46:50 2007
New Revision: 365

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=365
Log:
Extend loop test with test for override file.

Modified:
    trunk/src/insserv/debian/run-testsuite

Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=365&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Mon Dec 31 00:46:50 2007
@@ -12,11 +12,17 @@
 
 #debug="-v"
 
+insserv_reg() {
+    script=$initddir/$1
+    $insserv $debug -c $insconf -p $initddir $script
+}
+
 insertscript() {
-    script=$initddir/$1
+    scriptname=$1
+    script=$initddir/$scriptname
     cat > $script
     chmod a+rx $script
-    $insserv $debug -c $insconf -p $initddir $script
+    insserv_reg $scriptname
 }
 
 check_order() {
@@ -288,6 +294,7 @@
 echo
 mkdir -p $initddir
 
+# Two scripts with a loop between them
 insertscript loop1 <<'EOF'
 ### BEGIN INIT INFO
 # Provides:          loop1
@@ -307,6 +314,23 @@
 # Default-Stop:
 ### END INIT INFO
 EOF
+
+# Make override file to break the loop
+mkdir -p $tmpdir/insserv/override
+cat <<'EOF' > $tmpdir/insserv/override/loop1
+### BEGIN INIT INFO
+# Provides:          loop1
+# Required-Start:
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+insserv_reg loop1
+insserv_reg loop2
+
+check_order S loop1 loop2
 
 rm -rf $tmpdir
 




More information about the Initscripts-ng-commits mailing list