[Pkg-sysvinit-commits] r1292 - in sysvinit/trunk/debian: . sysv-rc/man8 sysv-rc/sbin

pere at alioth.debian.org pere at alioth.debian.org
Fri Jul 18 06:19:44 UTC 2008


Author: pere
Date: 2008-07-18 06:19:43 +0000 (Fri, 18 Jul 2008)
New Revision: 1292

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8
   sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d
Log:
  * Drop support for experimental flag file /etc/update-rc.d-lsbparse.
    People should use insserv if they want the boot system sequencing
    to use the LSB headers.  Patch from Kel Modderman.  This fixes
    typo in update-rc.d, making sure it ignore the LSB Default-Start
    header.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2008-07-17 13:11:34 UTC (rev 1291)
+++ sysvinit/trunk/debian/changelog	2008-07-18 06:19:43 UTC (rev 1292)
@@ -3,7 +3,11 @@
   * Make bootmisc.sh depend on $remote_fs instead of $local_fs, to
     make sure it is executed after mountnfs-bootclean.sh to avoid
     cleaning up /var/run/ twice (Closes: #491059).
-  * Fix typo in update-rc.d, making sure it ignore the LSB Default-Start header.
+  * Drop support for experimental flag file /etc/update-rc.d-lsbparse.
+    People should use insserv if they want the boot system sequencing
+    to use the LSB headers.  Patch from Kel Modderman.  This fixes
+    typo in update-rc.d, making sure it ignore the LSB Default-Start
+    header.
 
  -- Petter Reinholdtsen <pere at debian.org>  Wed, 16 Jul 2008 19:46:33 +0200
 

Modified: sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8
===================================================================
--- sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8	2008-07-17 13:11:34 UTC (rev 1291)
+++ sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8	2008-07-18 06:19:43 UTC (rev 1292)
@@ -108,14 +108,7 @@
 will make links to start the service in runlevels
 .B 2345
 and to stop the service in runlevels
-.BR 016 
-unless an LSB-style header is present in the init.d script and the
-.B /etc/update-rc.d-lsbparse
-file exist.  If such header exist, the levels listed in the
-.B Default-Start
-and
-.B Default-Stop
-fields in that header are used instead.
+.BR 016 .
 By default all the links will have sequence number 20, but
 this should be overridden if there are dependencies. For example if
 daemon B depends on A, then A must be started before B and B must be

Modified: sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d
===================================================================
--- sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d	2008-07-17 13:11:34 UTC (rev 1291)
+++ sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d	2008-07-18 06:19:43 UTC (rev 1292)
@@ -10,11 +10,6 @@
 my $etcd  = "/etc/rc";
 my $notreally = 0;
 
-# Only parse the LSB headers when this flag exist.  It is to be used
-# while we test this new feature, and should be removed when we are
-# confident that LSB headers are correct. [pere 2006-09-06]
-my $lsbparseflag = "/etc/update-rc.d-lsbparse";
-
 # Print usage message and die.
 
 sub usage {
@@ -55,6 +50,7 @@
 	print STDERR "update-rc.d: $initd/$bn: file does not exist\n";
 	exit (1);
     }
+    &parse_lsb_header("$initd/$bn");
 } elsif (-f "$initd/$bn") {
     if (!$force) {
 	printf STDERR "update-rc.d: $initd/$bn exists during rc.d purge (use -f to force)\n";
@@ -148,15 +144,15 @@
 
     # Check that all the required headers are present
     if (!$lsbinfo{found}) {
-	printf STDERR "update-rc.d: warning: $initdscript missing LSB style header\n";
+	printf STDERR "update-rc.d: warning: $initdscript missing LSB information\n";
+	printf STDERR "update-rc.d: see <http://wiki.debian.org/LSBInitScripts>\n";
     } else {
         for my $key (split(/\|/, lc($lsbheaders))) {
             if (!exists $lsbinfo{$key}) {
-                print STDERR "update-rc.d: warning: $initdscript missing LSB style header entry '$key'\n";
+                print STDERR "update-rc.d: warning: $initdscript missing LSB keyword '$key'\n";
             }
         }
     }
-    return %lsbinfo;
 }
 
 
@@ -174,26 +170,9 @@
     $start = sprintf("%02d", $start);
     $stop  = sprintf("%02d", $stop);
 
-    my %lsbinfo = parse_lsb_header("$initd/$bn");
-    if (-e $lsbparseflag && exists $lsbinfo{'default-stop'}) {
-	for my $level (split(/\s+/, $lsbinfo{'default-stop'})) {
-	    $level = 99 if ($level eq 'S');
-	    $stoplinks[$level] = "K$stop";
-	}
-    } else {
-	$stoplinks[0] = $stoplinks[1] = $stoplinks[6] = "K$stop";
-    }
+    $stoplinks[$_]  = "K$stop"  for (0, 1, 6);
+    $startlinks[$_] = "S$start" for (2, 3, 4, 5);
 
-    if (-e $lsbparseflag && exists $lsbinfo{'default-start'}) {
-	for my $level (split(/\s+/, $lsbinfo{'default-start'})) {
-	    $level = 99 if ($level eq 'S');
-	    $startlinks[$level] = "S$start";
-	}
-    } else {
-	$startlinks[2] = $startlinks[3] =
-	    $startlinks[4] = $startlinks[5] = "S$start";
-    }
-
     1;
 }
 




More information about the Pkg-sysvinit-commits mailing list