[Pkg-sysvinit-commits] r1669 - sysvinit/trunk/debian/sysv-rc/sbin
Kel Modderman
kelmo-guest at alioth.debian.org
Mon Aug 31 14:09:23 UTC 2009
Author: kelmo-guest
Date: 2009-08-31 14:09:23 +0000 (Mon, 31 Aug 2009)
New Revision: 1669
Modified:
sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d
Log:
Update code comment and restore info() priority message that LSB info will overidde command line arguments in case a difference between two is reported.
Modified: sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d
===================================================================
--- sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d 2009-08-31 13:39:50 UTC (rev 1668)
+++ sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d 2009-08-31 14:09:23 UTC (rev 1669)
@@ -394,13 +394,10 @@
} elsif ("defaults" eq $action || "start" eq $action ||
"stop" eq $action) {
# All start/stop/defaults arguments are discarded so emit a
- # message if arguments have been given. When update-rc.d is
- # used in package maintainer scripts output is almost always
- # redirected to /dev/null thanks to dh_installinit, so this
- # should not be too noisy.
- if ($#args >= 0) {
- cmp_args_with_defaults($scriptname, $action, @args);
- }
+ # message if arguments have been given and are in conflict
+ # with Default-Start/Default-Stop values of LSB comment.
+ cmp_args_with_defaults($scriptname, $action, @args);
+
if ( -f "/etc/init.d/$scriptname" ) {
my $rc = system "insserv", @opts, $scriptname;
if (0 == $rc && !$notreally) {
@@ -464,7 +461,7 @@
sub cmp_args_with_defaults {
my ($name, $act) = (shift, shift);
- my ($lsb_start_ref, $lsb_stop_ref, $arg_str, $lsb_str);
+ my ($lsb_start_ref, $lsb_stop_ref, $arg_str, $lsb_str, $differ);
my (@arg_start_lvls, @arg_stop_lvls, @lsb_start_lvls, @lsb_stop_lvls);
my $lsb_header = lsb_header_for_script($name);
@@ -497,6 +494,7 @@
if ($#arg_start_lvls != $#lsb_start_lvls or
join("\0", sort @arg_start_lvls) ne join("\0", sort @lsb_start_lvls)) {
+ $differ++;
$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",
@@ -504,11 +502,14 @@
}
if ($#arg_stop_lvls != $#lsb_stop_lvls or
join("\0", sort @arg_stop_lvls) ne join("\0", sort @lsb_stop_lvls)) {
+ $differ++;
$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)";
}
+
+ info "\`$act @_' overridden by LSB info of $lsb_header" if $differ;
}
sub insserv_toggle {
More information about the Pkg-sysvinit-commits
mailing list