[Pkg-sysvinit-devel] Bug#614895: Bug#614895: sysv-rc: Warning in update-rc.d swaps script and LSB Default values?

Chris Hiestand chiestand at salk.edu
Thu Feb 24 08:51:28 UTC 2011


I see what I was missing now. It's a little confusing to use the word "default" in 2 different contexts: 
1. As an argument meaning the LSB standard values for Default-Stop|Stop - "start 2 3 4 5, stop 0 1 6"
2. In the error message meaning the script's value for LSB Default-Start|Stop.

I think a better warning would be something like this:
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match foobar Default-Start values (2 3 5)
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match foobar Default-Stop values (0 1)


A new patch would look something like:

--- update-rc.d	2011-02-23 18:40:15.000000000 -0800
+++ /usr/sbin/update-rc.d	2011-02-24 00:44:43.043783266 -0800
@@ -480,6 +480,7 @@
     my ($name, $act) = (shift, shift);
     my ($lsb_start_ref, $lsb_stop_ref, $arg_str, $lsb_str);
     my (@arg_start_lvls, @arg_stop_lvls, @lsb_start_lvls, @lsb_stop_lvls);
+    my $default_msg = ($act eq 'defaults') ? 'default' : '';
 
     ($lsb_start_ref, $lsb_stop_ref) = parse_def_start_stop("/etc/init.d/$name");
     @lsb_start_lvls = @$lsb_start_ref;
@@ -523,15 +524,15 @@
         join("\0", sort @arg_start_lvls) ne join("\0", sort @lsb_start_lvls)) {
         $arg_str = @arg_start_lvls ? "@arg_start_lvls" : "none";
         $lsb_str = @lsb_start_lvls ? "@lsb_start_lvls" : "none";
-        warning "$name start runlevel arguments ($arg_str) do not match",
-                "LSB Default-Start values ($lsb_str)";
+        warning "$default_msg start runlevel arguments ($arg_str) do not match",
+                "$name Default-Start values ($lsb_str)";
     }
     if ($#arg_stop_lvls != $#lsb_stop_lvls or
         join("\0", sort @arg_stop_lvls) ne join("\0", sort @lsb_stop_lvls)) {
         $arg_str = @arg_stop_lvls ? "@arg_stop_lvls" : "none";
         $lsb_str = @lsb_stop_lvls ? "@lsb_stop_lvls" : "none";
-        warning "$name stop runlevel arguments ($arg_str) do not match",
-                "LSB Default-Stop values ($lsb_str)";
+        warning "$default_msg stop runlevel arguments ($arg_str) do not match",
+                "$name Default-Stop values ($lsb_str)";
     }
 }

What do you think?




More information about the Pkg-sysvinit-devel mailing list