[Fai-commit] r5830 - in trunk: bin debian lib
Michael Prokop
mika at alioth.debian.org
Sat Jul 3 23:00:49 UTC 2010
Author: mika
Date: 2010-07-03 23:00:48 +0000 (Sat, 03 Jul 2010)
New Revision: 5830
Modified:
trunk/bin/fai
trunk/debian/changelog
trunk/lib/subroutines
Log:
subroutines, fai: make sure fai exits with the according return
code of task action (and all the hooks behind it)
Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai 2010-07-03 18:27:14 UTC (rev 5829)
+++ trunk/bin/fai 2010-07-03 23:00:48 UTC (rev 5830)
@@ -307,7 +307,9 @@
[ "$action" ] && export FAI_ACTION=$action
unset action
task action 2>&1 | tee -a $LOGDIR/fai.log
+final_exit_code=${PIPESTATUS[0]}
[ -L "/var/run/fai/current_config" ] && rm -f "/var/run/fai/current_config"
echo "End of $0"
+exit $final_exit_code
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2010-07-03 18:27:14 UTC (rev 5829)
+++ trunk/debian/changelog 2010-07-03 23:00:48 UTC (rev 5830)
@@ -24,6 +24,10 @@
* control: Move setup-storage to its own package (fai-setup-storage). Thanks
Michael Prokop <mika at debian.org> for the patch (closes: #575812)
+ [ Michael Prokop ]
+ * subroutines, fai: make sure fai exits with the according return
+ code of task action (and all the hooks behind it)
+
-- Thomas Lange <lange at debian.org> Fri, 25 Jun 2010 14:29:10 +0200
fai (3.3.5) unstable; urgency=high
Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines 2010-07-03 18:27:14 UTC (rev 5829)
+++ trunk/lib/subroutines 2010-07-03 23:00:48 UTC (rev 5830)
@@ -155,7 +155,9 @@
task_error_func=''
task_$taskname
sendmon "TASKEND $taskname $task_error"
- [ "$task_error" -ne 0 ] && echo "Exit code task_$taskname: $task_error"
+ if [ "$task_error" -ne 0 ] ; then
+ echo "Exit code task_$taskname: $task_error"
+ fi
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
More information about the Fai-commit
mailing list