[Pkg-sysvinit-commits] r1667 - sysvinit/trunk/debian/sysv-rc/sbin

Kel Modderman kelmo-guest at alioth.debian.org
Mon Aug 31 13:38:57 UTC 2009


Author: kelmo-guest
Date: 2009-08-31 13:38:57 +0000 (Mon, 31 Aug 2009)
New Revision: 1667

Modified:
   sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d
Log:
Make sure -n dry run option is working for insserv_toggle() function.

Modified: sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d
===================================================================
--- sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d	2009-08-31 13:36:33 UTC (rev 1666)
+++ sysvinit/trunk/debian/sysv-rc/sbin/update-rc.d	2009-08-31 13:38:57 UTC (rev 1667)
@@ -408,7 +408,7 @@
             error("initscript does not exist: /etc/init.d/$scriptname");
         }
     } elsif ("disable" eq $action || "enable" eq $action) {
-        insserv_toggle($action, $scriptname, @args);
+        insserv_toggle($notreally, $action, $scriptname, @args);
         # Call insserv to resequence modified links
         my $rc = system "insserv", @opts, $scriptname;
         if (0 == $rc && !$notreally) {
@@ -509,7 +509,7 @@
 }
 
 sub insserv_toggle {
-    my ($act, $name) = (shift, shift);
+    my ($dryrun, $act, $name) = (shift, shift, shift);
     my (@toggle_lvls, $start_lvls, $stop_lvls, @symlinks);
     my $lsb_header = lsb_header_for_script($name);
 
@@ -554,7 +554,7 @@
             $new_lnk[$sk] = 'S';
         }
 
-        if ($notreally) {
+        if ($dryrun) {
             printf("rename(%s, %s)\n", $cur_lnk, join('', @new_lnk));
             next;
         }




More information about the Pkg-sysvinit-commits mailing list