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

Petter Reinholdtsen pere at alioth.debian.org
Sat Sep 12 22:04:30 UTC 2009


Author: pere
Date: 2009-09-12 22:04:29 +0000 (Sat, 12 Sep 2009)
New Revision: 1772

Modified:
   sysvinit/trunk/debian/src/sysv-rc/sbin/update-rc.d
Log:
Make sure insserv failure propagate properly into the update-rc.d exit code.

Modified: sysvinit/trunk/debian/src/sysv-rc/sbin/update-rc.d
===================================================================
--- sysvinit/trunk/debian/src/sysv-rc/sbin/update-rc.d	2009-09-12 16:10:26 UTC (rev 1771)
+++ sysvinit/trunk/debian/src/sysv-rc/sbin/update-rc.d	2009-09-12 22:04:29 UTC (rev 1772)
@@ -384,7 +384,7 @@
     $action = shift @args;
     if ("remove" eq $action) {
         if ( -f "/etc/init.d/$scriptname" ) {
-            my $rc = system "insserv", @opts, "-r", $scriptname;
+            my $rc = system("insserv", @opts, "-r", $scriptname) >> 8;
             if (0 == $rc && !$notreally) {
                 remove_last_action($scriptname);
             }
@@ -392,7 +392,7 @@
         } else {
             # insserv removes all dangling symlinks, no need to tell it
             # what to look for.
-            my $rc = system "insserv", @opts;
+            my $rc = system("insserv", @opts) >> 8;
             if (0 == $rc && !$notreally) {
                 remove_last_action($scriptname);
             }
@@ -406,7 +406,7 @@
         cmp_args_with_defaults($scriptname, $action, @args);
 
         if ( -f "/etc/init.d/$scriptname" ) {
-            my $rc = system "insserv", @opts, $scriptname;
+            my $rc = system("insserv", @opts, $scriptname) >> 8;
             if (0 == $rc && !$notreally) {
                 save_last_action($scriptname, @orig_argv);
             }
@@ -417,7 +417,7 @@
     } elsif ("disable" eq $action || "enable" eq $action) {
         insserv_toggle($notreally, $action, $scriptname, @args);
         # Call insserv to resequence modified links
-        my $rc = system "insserv", @opts, $scriptname;
+        my $rc = system("insserv", @opts, $scriptname) >> 8;
         if (0 == $rc && !$notreally) {
             save_last_action($scriptname, @orig_argv);
         }




More information about the Pkg-sysvinit-commits mailing list