[Initscripts-ng-commits] r941 - in /trunk/src/insserv/debian: changelog control dirs insserv.postinst insserv.postrm insserv.prerm insserv.templates manpages rules update-bootsystem-insserv update-bootsystem-insserv.8 update-rc.d-insserv update-rc.d-insserv.8

pere at users.alioth.debian.org pere at users.alioth.debian.org
Wed Jul 29 11:51:09 UTC 2009


Author: pere
Date: Wed Jul 29 11:51:09 2009
New Revision: 941

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=941
Log:
* Migrate the responsibility for enabling or disabling dependency
  based boot sequencing from the insserv package to the sysv-rc
  package.  Conflict with sysv-rc (<< 2.87dsf-3) for this
  transition.  Moves the update-bootsystem-insserv program and
  manual page to sysv-rc version 2.87dsf-3.  Leave
  update-rc.d-insserv in place to make it impossible for the
  update-rc.d diversion to be a dangling link during upgrades.  It
  should be removed in Squeeze+1.  Rewrite package description to
  reflect this.
* Drop dependencies on sysv-rc, initscripts and sysvinit-utils, and
  leave it for sys-rc to pull in the packages needed for dependency
  based boot sequencing to work.

Removed:
    trunk/src/insserv/debian/insserv.postinst
    trunk/src/insserv/debian/insserv.postrm
    trunk/src/insserv/debian/insserv.prerm
    trunk/src/insserv/debian/insserv.templates
    trunk/src/insserv/debian/update-bootsystem-insserv
    trunk/src/insserv/debian/update-bootsystem-insserv.8
Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/control
    trunk/src/insserv/debian/dirs
    trunk/src/insserv/debian/manpages
    trunk/src/insserv/debian/rules
    trunk/src/insserv/debian/update-rc.d-insserv
    trunk/src/insserv/debian/update-rc.d-insserv.8

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=941&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Wed Jul 29 11:51:09 2009
@@ -2,6 +2,18 @@
 
   * Remove references to /var/lib/insserv/using-insserv in postinst and
     prerm.  It is not used in these scripts.
+  * Migrate the responsibility for enabling or disabling dependency
+    based boot sequencing from the insserv package to the sysv-rc
+    package.  Conflict with sysv-rc (<< 2.87dsf-3) for this
+    transition.  Moves the update-bootsystem-insserv program and
+    manual page to sysv-rc version 2.87dsf-3.  Leave
+    update-rc.d-insserv in place to make it impossible for the
+    update-rc.d diversion to be a dangling link during upgrades.  It
+    should be removed in Squeeze+1.  Rewrite package description to
+    reflect this.
+  * Drop dependencies on sysv-rc, initscripts and sysvinit-utils, and
+    leave it for sys-rc to pull in the packages needed for dependency
+    based boot sequencing to work.
 
  -- Petter Reinholdtsen <pere at debian.org>  Tue, 28 Jul 2009 19:16:21 +0200
 

Modified: trunk/src/insserv/debian/control
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/control?rev=941&op=diff
==============================================================================
--- trunk/src/insserv/debian/control (original)
+++ trunk/src/insserv/debian/control Wed Jul 29 11:51:09 2009
@@ -12,12 +12,12 @@
 
 Package: insserv
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, sysv-rc, initscripts (>= 2.86.ds1-63), sysvinit-utils (>= 2.86.ds1-62)
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: sysv-rc (<= 2.87dsf-2)
 Suggests: bootchart
-Description: boot sequence organizer using LSB init.d script dependencies
- When enabled, this utility reorders the init.d boot scripts based on
- dependencies given in scripts' LSB comment headers, or in override
- files included in this package or added in /etc/insserv.
+Description: Tool to organize boot sequence using LSB init.d script dependencies
+ The insserv program is used to update the order of symlinks in /etc/rc?.d/ with
+ sysv-rc based on dependencies specified in the scripts themselves. 
  .
- This package should be used with care, as incorrect or missing dependencies
+ The program in this package should be used with care, as using it incorrectly
  can lead to an unbootable system.

Modified: trunk/src/insserv/debian/dirs
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/dirs?rev=941&op=diff
==============================================================================
--- trunk/src/insserv/debian/dirs (original)
+++ trunk/src/insserv/debian/dirs Wed Jul 29 11:51:09 2009
@@ -3,4 +3,3 @@
 etc/insserv/overrides
 usr/sbin
 usr/share/insserv/overrides
-var/lib/insserv

Modified: trunk/src/insserv/debian/manpages
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/manpages?rev=941&op=diff
==============================================================================
--- trunk/src/insserv/debian/manpages (original)
+++ trunk/src/insserv/debian/manpages Wed Jul 29 11:51:09 2009
@@ -1,2 +1,1 @@
-debian/update-bootsystem-insserv.8
 debian/update-rc.d-insserv.8

Modified: trunk/src/insserv/debian/rules
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/rules?rev=941&op=diff
==============================================================================
--- trunk/src/insserv/debian/rules (original)
+++ trunk/src/insserv/debian/rules Wed Jul 29 11:51:09 2009
@@ -66,7 +66,6 @@
 	$(INSTALL) debian/check-initd-order $(DESTDIR)$(pkgdatadir)/.
 	$(INSTALL) debian/seq-changes $(DESTDIR)$(pkgdatadir)/.
 	$(INSTALL) debian/make-testsuite $(DESTDIR)$(pkgdatadir)/.
-	$(INSTALL) debian/update-bootsystem-insserv $(DESTDIR)$(sbindir)/.
 	$(INSTALL) debian/update-rc.d-insserv $(DESTDIR)$(sbindir)/.
 
 	# Install bash(1) completion

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=941&op=diff
==============================================================================
--- trunk/src/insserv/debian/update-rc.d-insserv (original)
+++ trunk/src/insserv/debian/update-rc.d-insserv Wed Jul 29 11:51:09 2009
@@ -6,11 +6,11 @@
 my @opts;
 my $scriptname;
 my $action;
-my $dryrun = 0;
+my $notreally = 0;
 
 while($#ARGV >= 0 && ($_ = $ARGV[0]) =~ /^-/) {
     shift @ARGV;
-    if (/^-n$/) { push(@opts, $_); $dryrun++; next }
+    if (/^-n$/) { push(@opts, $_); $notreally++; next }
     if (/^-f$/) { push(@opts, $_); next }
     if (/^-h|--help$/) { &usage; }
     &usage("unknown option");
@@ -34,12 +34,12 @@
     # maintainer scripts output is almost always redirected to /dev/null
     # thanks to dh_installinit, so this should not be too noisy.
     if ($#ARGV >= 0) {
-	info("\`$action @ARGV' overridden by LSB info of $scriptname");
+        info("\`$action @ARGV' overridden by LSB info of $scriptname");
     }
     if ( -f "/etc/init.d/$scriptname" ) {
-    	exec "insserv", @opts, $scriptname;
+        exec "insserv", @opts, $scriptname;
     } else {
-    	error("initscript does not exist: /etc/init.d/$scriptname");
+        error("initscript does not exist: /etc/init.d/$scriptname");
     }
 } elsif ("disable" eq $action || "enable" eq $action) {
     toggle($action, $scriptname, @ARGV);
@@ -84,17 +84,17 @@
     open my $fh, '<', $script or error("unable to read $script");
     while (<$fh>) {
         chomp;
-	if (m/^### BEGIN INIT INFO$/) {
-	    $lsb{'begin'}++;
-	}
-	elsif (m/^### END INIT INFO$/) {
-	    $lsb{'end'}++;
-	    last;
-	}
-	elsif ($lsb{'begin'} and not $lsb{'end'}) {
-	    if (m/^# Default-Start:\s*(\S?.*)$/) {
-		@def_start_lvls = split(' ', $1);
-	    }
+        if (m/^### BEGIN INIT INFO$/) {
+            $lsb{'begin'}++;
+        }
+        elsif (m/^### END INIT INFO$/) {
+            $lsb{'end'}++;
+            last;
+        }
+        elsif ($lsb{'begin'} and not $lsb{'end'}) {
+            if (m/^# Default-Start:\s*(\S?.*)$/) {
+                @def_start_lvls = split(' ', $1);
+            }
         }
     }
     close($fh);
@@ -105,65 +105,65 @@
 sub toggle {
     my ($act, $name) = (shift, shift);
     my ($lsb_header, @runlevels, @symlinks);
-    
+
     # Prefer insserv override file if it exists.
     if (-s "/etc/insserv/overrides/$name") {
-	$lsb_header = "/etc/insserv/overrides/$name";
+        $lsb_header = "/etc/insserv/overrides/$name";
     } elsif (-s "/etc/init.d/$name") {
-    	$lsb_header = "/etc/init.d/$name";
+        $lsb_header = "/etc/init.d/$name";
     } elsif (-s "/usr/share/insserv/overrides/$name") {
-	# These overrides take effect only when no LSB info is
-	# in /etc/init.d/$name
-    	$lsb_header = "/usr/share/insserv/overrides/$name";
+        # These overrides take effect only when no LSB info is
+        # in /etc/init.d/$name
+        $lsb_header = "/usr/share/insserv/overrides/$name";
     } else {
-	error("cannot find an initscript for $name");
+        error("cannot find an initscript for $name");
     }
 
     # Extra arguments to disable|enable action are runlevels. If none
     # given parse LSB info for Default-Start value.
     if ($#_ >= 0) {
-	@runlevels = @_;
+        @runlevels = @_;
     } else {
-	@runlevels = parse_def_start($lsb_header);
-	if ($#runlevels < 0) {
-	    error("$name Default-Start contains no runlevels, aborting.");
-    	}
+        @runlevels = parse_def_start($lsb_header);
+        if ($#runlevels < 0) {
+            error("$name Default-Start contains no runlevels, aborting.");
+        }
     }
 
     # Find symlinks in rc.d directories. Refuse to modify links in runlevels
     # not used for normal system start sequence.
     for my $lvl (@runlevels) {
-	if ($lvl !~ /^[S2345]$/) {
-	    warning("$act action will have no effect on runlevel $lvl");
-	    next;
-	}
-	push(@symlinks, $_) for glob("/etc/rc$lvl.d/[SK][0-9][0-9]$name");
+        if ($lvl !~ /^[S2345]$/) {
+            warning("$act action will have no effect on runlevel $lvl");
+            next;
+        }
+        push(@symlinks, $_) for glob("/etc/rc$lvl.d/[SK][0-9][0-9]$name");
     }
 
     if (!@symlinks) {
-	error("no runlevel symlinks to modify, aborting!");
+        error("no runlevel symlinks to modify, aborting!");
     }
 
     # Toggle S/K bit of script symlink.
     for my $cur_lnk (@symlinks) {
-	my $sk;
-	my @new_lnk = split(//, $cur_lnk);
+        my $sk;
+        my @new_lnk = split(//, $cur_lnk);
 
-	if ("disable" eq $act) {
-	    $sk = rindex($cur_lnk, '/S') + 1;
-	    next if $sk < 1;
-	    $new_lnk[$sk] = 'K';
-	} else {
-	    $sk = rindex($cur_lnk, '/K') + 1;
-	    next if $sk < 1;
-	    $new_lnk[$sk] = 'S';
-	}
+        if ("disable" eq $act) {
+            $sk = rindex($cur_lnk, '/S') + 1;
+            next if $sk < 1;
+            $new_lnk[$sk] = 'K';
+        } else {
+            $sk = rindex($cur_lnk, '/K') + 1;
+            next if $sk < 1;
+            $new_lnk[$sk] = 'S';
+        }
 
-	if ($dryrun) {
-	    printf("rename(%s, %s)\n", $cur_lnk, join('', @new_lnk));
-	    next;
-	}
+        if ($notreally) {
+            printf("rename(%s, %s)\n", $cur_lnk, join('', @new_lnk));
+            next;
+        }
 
-	rename($cur_lnk, join('', @new_lnk)) or error($!);
+        rename($cur_lnk, join('', @new_lnk)) or error($!);
     }
 }

Modified: trunk/src/insserv/debian/update-rc.d-insserv.8
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/update-rc.d-insserv.8?rev=941&op=diff
==============================================================================
--- trunk/src/insserv/debian/update-rc.d-insserv.8 (original)
+++ trunk/src/insserv/debian/update-rc.d-insserv.8 Wed Jul 29 11:51:09 2009
@@ -1,13 +1,13 @@
-.\" Copyright 2008 Petter Reinholdtsen
+.\" Copyright 2008,2009 Petter Reinholdtsen
 .\" May be distributed under the GNU General Public License
-.TH "update-bootsystem-insserv" "8" "5 January 2008" "Petter Reinholdtsen" ""
+.TH "update-bootsystem-insserv" "8" "28 July 2009" "Petter Reinholdtsen" ""
 .SH "NAME"
-update\-rc.d\-insserv \- insert init.d scripts into boot system using dependency information in the init.d scripts
+update\-rc.d\-insserv \- obsolete
 .SH "DESCRIPTION"
 .B update\-rc.d\-insserv
-is an implementation of the update-rc.d interface for the dependency
-based boot sequencing system insserv.  It is enabled using
-update-bootsystem-insserv.
+is an obsolete implementation of the update-rc.d interface for the dependency
+based boot sequencing system insserv.  The implementation was moved into the
+sysv-rc update-rc.d implementation.
 .SH "SEE ALSO"
 update\-rc.d(8), insserv(8), update-bootsystem-insserv(8)
 .SH "AUTHOR"




More information about the Initscripts-ng-commits mailing list