[Fai-commit] r6353 - trunk/examples/simple/hooks

Thomas Lange lange at alioth.debian.org
Fri Apr 15 07:43:10 UTC 2011


Author: lange
Date: 2011-04-15 07:43:02 +0000 (Fri, 15 Apr 2011)
New Revision: 6353

Modified:
   trunk/examples/simple/hooks/prepareapt.CENTOS
Log:
use newer code for error trap


Modified: trunk/examples/simple/hooks/prepareapt.CENTOS
===================================================================
--- trunk/examples/simple/hooks/prepareapt.CENTOS	2011-04-14 18:55:05 UTC (rev 6352)
+++ trunk/examples/simple/hooks/prepareapt.CENTOS	2011-04-15 07:43:02 UTC (rev 6353)
@@ -2,7 +2,7 @@
 
 # (c) Michael Goetze, 2010-2011, mgoetze at mgoetze.net
 
-error=0 ; trap "error=$((error|1))" ERR
+error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
 
 if [ $FAI_ACTION = "install" ]; then
     mount -t proc proc $target/proc




More information about the Fai-commit mailing list