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

Kel Modderman kel at otaku42.de
Mon Apr 9 08:08:27 UTC 2012


Hi All,

> 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?

I agree with the patch, Roger would it possible to include this patch in
sysvinit git please?

Thanks, Kel





More information about the Pkg-sysvinit-devel mailing list