[Initscripts-ng-commits] r884 - in /trunk/src/insserv/debian: changelog update-rc.d-insserv

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Sat May 16 12:43:49 UTC 2009


Author: kelmo-guest
Date: Sat May 16 12:43:48 2009
New Revision: 884

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=884
Log:
Improve update-rc.d enable/disable function for when an unhandled
runlevel is given as argument.

Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/update-rc.d-insserv

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=884&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Sat May 16 12:43:48 2009
@@ -34,8 +34,10 @@
   * Improve the way in which update-rc.d disable/enable function
     determines index of S or K bit of runlevel symlink by using rindex
     instead of a harcoded index.
-
- -- Kel Modderman <kel at otaku42.de>  Sat, 16 May 2009 22:22:12 +1000
+  * Improve update-rc.d enable/disable function for when an unhandled
+    runlevel is given as argument.
+
+ -- Kel Modderman <kel at otaku42.de>  Sat, 16 May 2009 22:40:15 +1000
 
 insserv (1.12.0-4) unstable; urgency=low
 

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=884&op=diff
==============================================================================
--- trunk/src/insserv/debian/update-rc.d-insserv (original)
+++ trunk/src/insserv/debian/update-rc.d-insserv Sat May 16 12:43:48 2009
@@ -62,6 +62,10 @@
     print STDOUT "update-rc.d: @_\n";
 }
 
+sub warning {
+    print STDERR "update-rc.d: warning: @_\n";
+}
+
 sub error {
     print STDERR "update-rc.d: error: @_\n";
     exit (1);
@@ -116,18 +120,18 @@
     	}
     }
 
-    # Find symlinks in rc.d directories. Refuse to modify links
-    # in runlevels 0 or 6, these adjustments are best done manually
-    # (with rm) or provided by the maintainer of script per default.
+    # 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]$/) {
-	    error("$act action will have no effect on runlevel $lvl");
+	    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 found, aborting!");
+	error("no runlevel symlinks to modify, aborting!");
     }
 
     # Toggle S/K bit of script symlink.




More information about the Initscripts-ng-commits mailing list