[Fai-commit] r4475 - trunk/bin

lange at alioth.debian.org lange at alioth.debian.org
Sun Aug 5 15:08:03 UTC 2007


Author: lange
Date: 2007-08-05 15:08:02 +0000 (Sun, 05 Aug 2007)
New Revision: 4475

Modified:
   trunk/bin/fcopy
Log:
check error code of preinst and postinst scripts (closes: #432681)


Modified: trunk/bin/fcopy
===================================================================
--- trunk/bin/fcopy	2007-08-05 15:05:34 UTC (rev 4474)
+++ trunk/bin/fcopy	2007-08-05 15:08:02 UTC (rev 4475)
@@ -27,7 +27,7 @@
 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #*********************************************************************
 
-my $version = "Version 2.2.11, 11-june-2007";
+my $version = "Version 2.2.12, 5-august-2007";
 
 use strict;
 use File::Copy;
@@ -222,6 +222,9 @@
   warn "executing $sourcefile/$scriptname $class $destfile\n" if $debug;
   return if $dryrun; # do not execute if -n or FCOPY_DRYRUN was given
   system "$sourcefile/$scriptname $class $destfile";
+  my $rc = $?>>8;
+  warn "ERROR: $scriptname returned code $rc\n" if $rc;
+  $error=1 if $rc;
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 sub name2num {




More information about the Fai-commit mailing list