Package: sysv-rc Version: 2.88dsf-13.1 Severity: minor Tags: patch It seems to me that when an init script has non-lsb-standard runlevels, they get misreported by update-rc.d:
sudo update-rc.d foobar defaults 25 update-rc.d: using dependency based boot sequencing update-rc.d: warning: foobar start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (4 5) update-rc.d: warning: foobar stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (2 3) If the LSB headers in foobar are: ### BEGIN INIT INFO # Provides: foobar # Required-Start: mountdevsubfs $remote_fs $syslog # Required-Stop: # Should-Start: udev # Default-Start: 4 5 # Default-Stop: 2 3 # Short-Description: foo to the bar ### END INIT INFO Then I'd imagine that the warning should read: update-rc.d: warning: foobar start runlevel arguments (4 5) do not match LSB Default-Start values (2 3 4 5) update-rc.d: warning: foobar stop runlevel arguments (2 3) do not match LSB Default-Stop values (0 1 6) Maybe I'm wrong and just misunderstanding how warning should be displayed? If so, is there another way to reword and make it more clear? Patch to swap setting variables: --- update-rc.d 2011-02-23 18:40:15.000000000 -0800 +++ /usr/sbin/update-rc.d 2011-02-23 18:31:21.052032988 -0800 @@ -478,17 +478,17 @@ sub cmp_args_with_defaults { my ($name, $act) = (shift, shift); - my ($lsb_start_ref, $lsb_stop_ref, $arg_str, $lsb_str); + my ($arg_start_ref, $arg_stop_ref, $arg_str, $lsb_str); my (@arg_start_lvls, @arg_stop_lvls, @lsb_start_lvls, @lsb_stop_lvls); - ($lsb_start_ref, $lsb_stop_ref) = parse_def_start_stop("/etc/init.d/$name"); - @lsb_start_lvls = @$lsb_start_ref; - @lsb_stop_lvls = @$lsb_stop_ref; - return if (!@lsb_start_lvls and !@lsb_stop_lvls); + ($arg_start_ref, $arg_stop_ref) = parse_def_start_stop("/etc/init.d/$name"); + @arg_start_lvls = @$arg_start_ref; + @arg_stop_lvls = @$arg_stop_ref; + return if (!@arg_start_lvls and !@arg_stop_lvls); if ($act eq 'defaults') { - @arg_start_lvls = (2, 3, 4, 5); - @arg_stop_lvls = (0, 1, 6); + @lsb_start_lvls = (2, 3, 4, 5); + @lsb_stop_lvls = (0, 1, 6); } elsif ($act eq 'start' or $act eq 'stop') { my $start = $act eq 'start' ? 1 : 0; my $stop = $act eq 'stop' ? 1 : 0; @@ -512,8 +512,8 @@ } elsif ($arg eq '.') { next; } - push(@arg_start_lvls, $arg) if $start; - push(@arg_stop_lvls, $arg) if $stop; + push(@lsb_start_lvls, $arg) if $start; + push(@lsb_stop_lvls, $arg) if $stop; } continue { $argi++; } -- System Information: Debian Release: 6.0 APT prefers stable APT policy: (900, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages sysv-rc depends on: ii debconf [debconf-2.0] 1.5.36.1 Debian configuration management sy ii insserv 1.14.0-2 Tool to organize boot sequence usi ii sysvinit-utils 2.88dsf-13.1 System-V-like utilities Versions of packages sysv-rc recommends: ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip Versions of packages sysv-rc suggests: pn bum <none> (no description available) pn sysv-rc-conf <none> (no description available) -- debconf information: sysv-rc/unable-to-convert: sysv-rc/convert-legacy: true -- debsums errors found: debsums: changed file /usr/sbin/update-rc.d (from sysv-rc package)
--- update-rc.d 2011-02-23 18:40:15.000000000 -0800 +++ /usr/sbin/update-rc.d 2011-02-23 18:31:21.052032988 -0800 @@ -478,17 +478,17 @@ sub cmp_args_with_defaults { my ($name, $act) = (shift, shift); - my ($lsb_start_ref, $lsb_stop_ref, $arg_str, $lsb_str); + my ($arg_start_ref, $arg_stop_ref, $arg_str, $lsb_str); my (@arg_start_lvls, @arg_stop_lvls, @lsb_start_lvls, @lsb_stop_lvls); - ($lsb_start_ref, $lsb_stop_ref) = parse_def_start_stop("/etc/init.d/$name"); - @lsb_start_lvls = @$lsb_start_ref; - @lsb_stop_lvls = @$lsb_stop_ref; - return if (!@lsb_start_lvls and !@lsb_stop_lvls); + ($arg_start_ref, $arg_stop_ref) = parse_def_start_stop("/etc/init.d/$name"); + @arg_start_lvls = @$arg_start_ref; + @arg_stop_lvls = @$arg_stop_ref; + return if (!@arg_start_lvls and !@arg_stop_lvls); if ($act eq 'defaults') { - @arg_start_lvls = (2, 3, 4, 5); - @arg_stop_lvls = (0, 1, 6); + @lsb_start_lvls = (2, 3, 4, 5); + @lsb_stop_lvls = (0, 1, 6); } elsif ($act eq 'start' or $act eq 'stop') { my $start = $act eq 'start' ? 1 : 0; my $stop = $act eq 'stop' ? 1 : 0; @@ -512,8 +512,8 @@ } elsif ($arg eq '.') { next; } - push(@arg_start_lvls, $arg) if $start; - push(@arg_stop_lvls, $arg) if $stop; + push(@lsb_start_lvls, $arg) if $start; + push(@lsb_stop_lvls, $arg) if $stop; } continue { $argi++; }