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

pere at users.alioth.debian.org pere at users.alioth.debian.org
Tue Jan 1 21:13:10 UTC 2008


Author: pere
Date: Tue Jan  1 21:13:10 2008
New Revision: 402

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=402
Log:
  * UNRELEASED
  * Add test to demonstrate the fake loop warning issue.

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=402&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Tue Jan  1 21:13:10 2008
@@ -1,3 +1,11 @@
+insserv (1.09.0-11) unstable; urgency=low
+
+  * UNRELEASED
+
+  * Add test to demonstrate the fake loop warning issue.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Tue,  1 Jan 2008 21:57:58 +0100
+
 insserv (1.09.0-10) unstable; urgency=low
 
   * Make sure to exit with an error code if it isn't safe to remove

Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=402&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Tue Jan  1 21:13:10 2008
@@ -362,6 +362,73 @@
 # XXX This do not work yet, as the override file seem to be ignored
 #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
+# the stop sequence, but in the combined graph insserv is creating
+# internally, there is a loop.  This make sense, as scripts need to be
+# installed in dependency order, and there is no way to install these
+# scripts that make sure both start and stop dependencies are
+# fulfilled.
+rm -rf $initddir
+mkdir -p $initddir
+
+insertscript startfirst <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          startfirst
+# Required-Start:
+# Required-Stop:     startsecond
+# Default-Start:     S
+# Default-Stop:      6
+### END INIT INFO
+EOF
+
+insertscript startsecond <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          startsecond
+# Required-Start:    startfirst
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:      6
+### END INIT INFO
+EOF
+
+(cd $tmpdir && ls *)
+
+check_order S startfirst startsecond
+check_order 6 startsecond startfirst
+
+# Test another fake loop.  This one should work, as it is possible to
+# install the two scripts in sequence because one of the dependencies
+# are optional.  It does not with insserv today.
+rm -rf $initddir
+mkdir -p $initddir
+
+insertscript startfirst <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          startfirst
+# Required-Start:
+# Required-Stop:
+# Should-Stop:       startsecond
+# Default-Start:     S
+# Default-Stop:      6
+### END INIT INFO
+EOF
+
+insertscript startsecond <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          startsecond
+# Required-Start:    startfirst
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:      6
+### END INIT INFO
+EOF
+
+(cd $tmpdir && ls *)
+
+check_order S startfirst startsecond
+check_order 6 startsecond startfirst
+
 rm -rf $tmpdir
 
 if [ 0 != $retval ] ; then




More information about the Initscripts-ng-commits mailing list