[Initscripts-ng-commits] r127 - in /trunk/src/insserv/debian:
changelog check-initd-order
pere at users.alioth.debian.org
pere at users.alioth.debian.org
Thu Sep 7 09:14:15 UTC 2006
Author: pere
Date: Thu Sep 7 09:14:15 2006
New Revision: 127
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=127
Log:
* New upstream release.
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/check-initd-order
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=127&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Thu Sep 7 09:14:15 2006
@@ -1,3 +1,10 @@
+insserv (1.08.0-3) UNRELEASED; urgency=low
+
+ * Extend check-initd-order to accept a new argument -o, to not load
+ the override files.
+
+ -- Petter Reinholdtsen <pere at debian.org> Thu, 7 Sep 2006 11:12:58 +0200
+
insserv (1.08.0-2) unstable; urgency=low
* New patch 35_fixunused removing incorrect 'unused' flagg from a
Modified: trunk/src/insserv/debian/check-initd-order
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/check-initd-order?rev=127&op=diff
==============================================================================
--- trunk/src/insserv/debian/check-initd-order (original)
+++ trunk/src/insserv/debian/check-initd-order Thu Sep 7 09:14:15 2006
@@ -17,6 +17,8 @@
my $rcbase = "/etc";
#$rcbase = "/opt/ltsp/i386/etc";
+
+my $overridepath = "/usr/share/insserv/overrides";
my $debug = 0;
@@ -52,9 +54,10 @@
my %scriptorder;
my %opts;
-getopts('dg', \%opts);
+getopts('dgo', \%opts);
$debug = $opts{'d'};
+my $useoverrides = $opts{'o'} ? 0 : 1;
if ($opts{'g'}) {
graph_generate();
@@ -65,6 +68,11 @@
sub graph_addnode {
my %lsbinfo = @_;
+
+ unless ($lsbinfo{'provides'}) {
+ print STDERR "error: File ". $lsbinfo{'file'} . " is missing the provides header\n";
+ $lsbinfo{'provides'} = $lsbinfo{'file'};
+ }
my @provides = split(/\s+/, $lsbinfo{'provides'});
for my $name (@provides) {
@@ -78,13 +86,13 @@
print STDERR "Unable to properly handle multiple provides: @provides\n";
}
- if ($lsbinfo{'required-start'}) {
+ if (exists $lsbinfo{'required-start'} && $lsbinfo{'required-start'}) {
my @depends = split(/\s+/, $lsbinfo{'required-start'});
for my $pkg (@depends) {
print "\"$pkg\" -> \"$provides[0]\"[color=blue];\n";
}
}
- if ($lsbinfo{'should-start'}) {
+ if (exists $lsbinfo{'should-start'} && $lsbinfo{'should-start'}) {
my @depends = split(/\s+/, $lsbinfo{'should-start'});
for my $pkg (@depends) {
print "\"$pkg\" -> \"$provides[0]\"[color=springgreen] ;\n";
@@ -102,7 +110,8 @@
for my $rcdir ($rcmap{S}, $rcmap{2}) {
chdir "$rcbase/$rcdir/.";
for my $script (<[SK]*>) {
- my $lsbinforef = load_lsb_tags("$rcbase/$rcdir/$script");
+ my $lsbinforef = load_lsb_tags("$rcbase/$rcdir/$script",
+ $useoverrides);
unless (defined $lsbinforef) {
print STDERR "LSB header missing in $rcbase/$rcdir/$script\n";
@@ -131,7 +140,8 @@
# print "$script\n";
# print "T: $tag O: $order N: $name\n";
- my $lsbinforef = load_lsb_tags("$rcbase/$rcdir/$script");
+ my $lsbinforef = load_lsb_tags("$rcbase/$rcdir/$script",
+ $useoverrides);
unless (defined $lsbinforef) {
print STDERR "LSB header missing in $rcbase/$rcdir/$script\n";
@@ -165,7 +175,7 @@
}
sub load_lsb_tags {
- my ($initfile, $override) = @_;
+ my ($initfile, $useoverrides) = @_;
print STDERR "Loading $initfile\n" if $debug;
### BEGIN INIT INFO
# Provides: xdebconfigurator
@@ -197,12 +207,14 @@
# Try override file
$initfile = readlink($initfile) if (-l $initfile);
my $basename = basename($initfile);
-
+
if (!$found) {
- print STDERR "Override /usr/share/insserv/overrides/$basename\n"
- if $debug;
- if (!$override && -f "/usr/share/insserv/overrides/$basename") {
- return load_lsb_tags("/usr/share/insserv/overrides/$basename", 1);
+ if ($useoverrides && -f "$overridepath/$basename") {
+ print STDERR "Override $overridepath/$basename\n"
+ if $debug;
+ return load_lsb_tags("$overridepath/$basename", $useoverrides);
+ } else {
+ return {'provides' => $basename};
}
}
return undef unless ($found);
@@ -214,5 +226,6 @@
'required-stop' => $requiredstop,
'should-start' => $shouldstart,
'should-stop' => $shouldstop,
+ 'file' => $initfile,
};
}
More information about the Initscripts-ng-commits
mailing list