Author: rra
Date: 2008-01-03 07:44:20 +0100 (Thu, 03 Jan 2008)
New Revision: 1099

Modified:
   trunk/checks/init.d
   trunk/checks/init.d.desc
   trunk/debian/changelog
   trunk/testset/tags.scripts
Log:
* checks/init.d{.desc,}:
  + [RA] Warn of init scripts that list S in their Default-Stop LSB
    keyword.  Thanks, Petter Reinholdtsen.  (Closes: #458596)

Modified: trunk/checks/init.d
===================================================================
--- trunk/checks/init.d 2008-01-03 06:10:08 UTC (rev 1098)
+++ trunk/checks/init.d 2008-01-03 06:44:20 UTC (rev 1099)
@@ -226,6 +226,9 @@
                    if ($start{$runlevel}) {
                        tag "init.d-script-has-conflicting-start-stop", 
"/etc/init.d/$_ $runlevel";
                    }
+                   if ($runlevel =~ /[sS]/) {
+                       tag "init-d-script-stops-in-s-runlevel", 
"/etc/init.d/$_";
+                   }
                } else {
                    tag "init.d-script-has-bad-stop-runlevel", "/etc/init.d/$_ 
$runlevel";
                }
@@ -255,4 +258,8 @@
 
 1;
 
+# Local Variables:
+# indent-tabs-mode: t
+# cperl-indent-level: 4
+# End:
 # vim: syntax=perl ts=8

Modified: trunk/checks/init.d.desc
===================================================================
--- trunk/checks/init.d.desc    2008-01-03 06:10:08 UTC (rev 1098)
+++ trunk/checks/init.d.desc    2008-01-03 06:44:20 UTC (rev 1099)
@@ -147,7 +147,7 @@
 Ref: http://wiki.debian.org/LSBInitScripts
 Info: The given runlevel specified in the Default-Stop keyword of the LSB
  keyword section of this <tt>/etc/init.d</tt> script isn't one of the
- recognized standard runlevels (S, 0, 1, 2, 3, 4, 5, and 6).
+ recognized standard runlevels (0, 1, 2, 3, 4, 5, and 6).
 
 Tag: init.d-script-has-conflicting-start-stop
 Type: warning
@@ -157,3 +157,11 @@
  <tt>/etc/init.d</tt> script.  Since it doesn't make sense to both start
  and stop a service in the same runlevel, there is probably an error in
  one or the other of these keywords.
+
+Tag: init-d-script-stops-in-s-runlevel
+Type: warning
+Info: This <tt>/etc/init.d</tt> script specifies the S runlevel in
+ Default-Stop in its LSB keyword section.  The S runlevel is not a real
+ runlevel and is only used during boot.  There is no way to switch to it
+ and hence no use for stop scripts for it, so S should be removed from
+ Default-Stop.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-01-03 06:10:08 UTC (rev 1098)
+++ trunk/debian/changelog      2008-01-03 06:44:20 UTC (rev 1099)
@@ -24,6 +24,9 @@
       match debian/rules.  (Closes: #457501)
   * checks/files.desc:
     + [RA] Remove a stray variable from the config-file-reserved tag.
+  * checks/init.d{.desc,}:
+    + [RA] Warn of init scripts that list S in their Default-Stop LSB
+      keyword.  Thanks, Petter Reinholdtsen.  (Closes: #458596)
   * checks/menu-format.desc:
     + [RA] Fix non-wm-module-in-wm-modules-menu-section pluralization to
       match the check and reword the long description to be hopefully

Modified: trunk/testset/tags.scripts
===================================================================
--- trunk/testset/tags.scripts  2008-01-03 06:10:08 UTC (rev 1098)
+++ trunk/testset/tags.scripts  2008-01-03 06:44:20 UTC (rev 1099)
@@ -44,6 +44,8 @@
 W: scripts: executable-is-not-world-readable usr/bin/perl-bizarre-2 0750 != 
0755
 W: scripts: executable-is-not-world-readable usr/bin/suidperlfoo2 4751
 W: scripts: executable-not-elf-or-script ./usr/bin/perl-bizarre-3
+W: scripts: init-d-script-stops-in-s-runlevel /etc/init.d/lsb-broken
+W: scripts: init-d-script-stops-in-s-runlevel /etc/init.d/skeleton
 W: scripts: init.d-script-has-bad-lsb-line /etc/init.d/lsb-broken:4
 W: scripts: init.d-script-has-bad-lsb-line /etc/init.d/lsb-broken:9
 W: scripts: init.d-script-has-bad-stop-runlevel /etc/init.d/lsb-broken X


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to