tag 429398 patch user [EMAIL PROTECTED] usertag 429398 supplied-patch thanks
Op maandag 18-06-2007 om 18:32 uur [tijdzone +0200], schreef Petter Reinholdtsen: > Yes, this is a bug in this script. It is not implemented to handle > more than one override directory, and should be changed to handle it. > Patches are most welcome. Hi, As I should do something at DebConf I have prepared a patch for your pleasure. See the attached diff. > Happy hacking, Happy uploading, Greetings Arjan
diff -u insserv-1.08.0/debian/check-initd-order insserv-1.08.0/debian/check-initd-order --- insserv-1.08.0/debian/check-initd-order +++ insserv-1.08.0/debian/check-initd-order @@ -17,6 +17,7 @@ #$rcbase = "/opt/ltsp/i386/etc"; my $overridepath = "/usr/share/insserv/overrides"; +my $hostoverridepath = "/etc/insserv/overrides"; my $debug = 0; @@ -208,7 +209,33 @@ sub load_lsb_tags { my ($initfile, $useoverrides) = @_; - print STDERR "Loading $initfile\n" if $debug; + my $lsbinforef = load_lsb_tags_from_file($initfile); + + if ($useoverrides) { + # Try override file + $initfile = readlink($initfile) if (-l $initfile); + my $basename = basename($initfile); + + # Only read shipped override file when initscript does not + # contain LSB tags. + if (! defined($lsbinforef) && -f "$overridepath/$basename") { + print STDERR "Override $overridepath/$basename\n" if $debug; + $lsbinforef = load_lsb_tags_from_file("$overridepath/$basename"); + } + + # Always read the host override in $hostoverridepath. + if (-f "$hostoverridepath/$basename") { + print STDERR "Override $hostoverridepath/$basename\n" if $debug; + $lsbinforef = load_lsb_tags_from_file("$hostoverridepath/$basename"); + } + + } + return $lsbinforef; +} + +sub load_lsb_tags_from_file { + my ($file) = @_; + print STDERR "Loading $file\n" if $debug; ### BEGIN INIT INFO # Provides: xdebconfigurator # Required-Start: $syslog @@ -219,8 +246,8 @@ # Description: Preseed X configuration and use dexconf to # genereate a new configuration file. ### END INIT INFO - unless (open(FILE, "<$initfile")) { - warn "error: Unable to read $initfile"; + unless (open(FILE, "<$file")) { + warn "error: Unable to read $file"; return; } my $found = 0; @@ -239,17 +266,6 @@ } close(FILE); - # Try override file - $initfile = readlink($initfile) if (-l $initfile); - my $basename = basename($initfile); - - if (!$found) { - if ($useoverrides && -f "$overridepath/$basename") { - print STDERR "Override $overridepath/$basename\n" - if $debug; - return load_lsb_tags("$overridepath/$basename", $useoverrides); - } - } return undef unless ($found); # print "Provides: $provides\n" if $provides; @@ -260,5 +276,5 @@ 'should-start' => $shouldstart, 'should-stop' => $shouldstop, - 'file' => $initfile, + 'file' => $file, }; } diff -u insserv-1.08.0/debian/changelog insserv-1.08.0/debian/changelog --- insserv-1.08.0/debian/changelog +++ insserv-1.08.0/debian/changelog @@ -1,3 +1,11 @@ +insserv (1.08.0-13.1) unstable; urgency=low + + * Non-maintainer upload. + * Let /usr/share/insserv/check-initd-order read override files in + /etc/insserv/overrides/ just like insserv does. (Closes: #429398) + + -- Arjan Oosting <[EMAIL PROTECTED]> Mon, 18 Jun 2007 21:09:03 +0100 + insserv (1.08.0-13) unstable; urgency=low * Add override files for sysfsutils and hplip.
signature.asc
Description: Dit berichtdeel is digitaal ondertekend