[Initscripts-ng-commits] r974 - /trunk/src/insserv/debian/update-rc.d-insserv
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Mon Aug 31 15:12:43 UTC 2009
Author: kelmo-guest
Date: Mon Aug 31 15:12:43 2009
New Revision: 974
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=974
Log:
Sync with sysvinit update-rc.d for fixups to cmp_args_with_defaults
Modified:
trunk/src/insserv/debian/update-rc.d-insserv
Modified: trunk/src/insserv/debian/update-rc.d-insserv
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/update-rc.d-insserv?rev=974&op=diff
==============================================================================
--- trunk/src/insserv/debian/update-rc.d-insserv (original)
+++ trunk/src/insserv/debian/update-rc.d-insserv Mon Aug 31 15:12:43 2009
@@ -472,6 +472,8 @@
@lsb_stop_lvls = @$lsb_stop_ref;
return if (!@lsb_start_lvls and !@lsb_stop_lvls);
+ shift if ($_[0] ne 'start' and $_[0] ne 'stop' and $_[0] ne 'defaults');
+
if ($act eq 'defaults') {
@arg_start_lvls = (2, 3, 4, 5);
@arg_stop_lvls = (0, 1, 6);
@@ -479,18 +481,20 @@
my $start = $act eq 'start' ? 1 : 0;
my $stop = $act eq 'stop' ? 1 : 0;
- foreach my $arg (@_) {
+ my $argi = 0;
+ while (defined $_[$argi]) {
+ my $arg = $_[$argi];
if ($arg eq 'start') {
- $start = 1; $stop = 0; next;
+ $start = 1; $stop = 0; $argi++; next;
} elsif ($arg eq 'stop') {
- $start = 0; $stop = 1; next;
- } elsif ($arg =~ /^[0-9]{2}$/) {
- next;
+ $start = 0; $stop = 1; $argi++; next;
} elsif ($arg eq '.') {
next;
}
push(@arg_start_lvls, $arg) if $start;
push(@arg_stop_lvls, $arg) if $stop;
+ } continue {
+ $argi++;
}
}
More information about the Initscripts-ng-commits
mailing list