[Initscripts-ng-commits] r1078 - in /trunk/src/insserv/debian: changelog patches/series run-testsuite
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Thu Jul 5 11:07:29 UTC 2012
Author: kelmo-guest
Date: Thu Jul 5 11:07:28 2012
New Revision: 1078
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=1078
Log:
Provide machine parseable output which may be used by file-rc to calculate
dynamic sequence number for each script. (Closes: #573004)
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/patches/series
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=1078&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Thu Jul 5 11:07:28 2012
@@ -1,3 +1,10 @@
+insserv (1.14.0-5) unstable; urgency=low
+
+ * Provide machine parseable output which may be used by file-rc to calculate
+ dynamic sequence number for each script. (Closes: #573004)
+
+ -- Kel Modderman <kel at otaku42.de> Thu, 05 Jul 2012 21:03:06 +1000
+
insserv (1.14.0-4) unstable; urgency=low
* Use "overrides" instead of "overwrites" and define defaults as "LSB
Modified: trunk/src/insserv/debian/patches/series
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/series?rev=1078&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/series (original)
+++ trunk/src/insserv/debian/patches/series Thu Jul 5 11:07:28 2012
@@ -4,7 +4,7 @@
21_tweak_warnings.patch
30_interactive_regexp_match_fix.patch
92_m68k_alignment.patch
-#100_show.patch
+100_show.patch
110_portmap.patch
130_crossbuild_fixes.patch
140_debian_test_suite.patch
Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=1078&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Thu Jul 5 11:07:28 2012
@@ -2274,7 +2274,89 @@
check_script_not_present S somescript
check_script_present S corekeeper
}
-
+##########################################################################
+insserv_show()
+{
+ $insserv $debug -c $insconf -p $initddir -o $overridedir -r $script -s
+}
+
+test_show_all() {
+echo
+echo "info: test if -s|--show-all option works as it should"
+echo
+
+initdir_purge
+
+insertscript bootscript <<'EOF'
+### BEGIN INIT INFO
+# Provides: bootscript
+# Required-Start:
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+insertscript localscript <<'EOF'
+### BEGIN INIT INFO
+# Provides: localscript
+# Required-Start:
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+EOF
+
+insertscript shutdownscript <<'EOF'
+### BEGIN INIT INFO
+# Provides: shutdownscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop: 0 6
+### END INIT INFO
+EOF
+
+check_script_present S bootscript
+check_script_present 2 localscript
+check_script_present 0 shutdownscript
+
+OLDIFS="$IFS"
+IFS=":"
+insserv_show | sort -t: -k2 -k1 | while read IN_ACTION IN_SEQUENCE IN_LEVELS IN_BASENAME
+do
+ IN_LEVELS="$(echo "$IN_LEVELS" | sed -e 's; ;,;g')"
+ if [ "$IN_ACTION" = "S" ]; then
+ echo "$IN_SEQUENCE - $IN_LEVELS /etc/init.d/$IN_BASENAME"
+ elif [ "$IN_ACTION" = "K" ]; then
+ echo "$IN_SEQUENCE $IN_LEVELS - /etc/init.d/$IN_BASENAME"
+ fi
+done > ${tmpdir}/rc.conf
+IFS="$OLDIFS"
+
+cat ${tmpdir}/rc.conf
+
+if grep -qE '[[:digit:]]{2}[[:space:]]+-[[:space:]]+S[[:space:]]+/etc/init.d/bootscript' ${tmpdir}/rc.conf; then
+ counttest
+else
+ error "bootscript configuration error in rc.conf"
+fi
+
+if grep -qE '[[:digit:]]{2}[[:space:]]+-[[:space:]]+2,3,4,5[[:space:]]+/etc/init.d/localscript' ${tmpdir}/rc.conf && \
+ grep -qE '[[:digit:]]{2}[[:space:]]+0,1,6[[:space:]]+-[[:space:]]+/etc/init.d/localscript' ${tmpdir}/rc.conf; then
+ counttest
+else
+ error "localscript configuration error in rc.conf"
+fi
+
+if grep -qE '[[:digit:]]{2}[[:space:]]+0,6[[:space:]]+-[[:space:]]+/etc/init.d/shutdownscript' ${tmpdir}/rc.conf; then
+ counttest
+else
+ error "shutdownscript configuration error in rc.conf"
+fi
+
+rm -f ${tmpdir}/rc.conf
+}
##########################################################################
test_normal_sequence
@@ -2318,3 +2400,4 @@
test_insserv_upstart
test_undetected_loop # 2 non-fatal tests failing
test_invalid_core_string
+test_show_all
More information about the Initscripts-ng-commits
mailing list