openlava/openlava — Issue #12: Some checks on exit codes at startup
Author: robertomeda
Created: 2012-01-02 13:29:16+00:00
State: open

diff --git a/config/openlava.in b/config/openlava.in
index 41171c7..d76803e 100755
--- a/config/openlava.in
+++ b/config/openlava.in
@@ -67,20 +67,32 @@ case "$opcode" in
if [ "$ID" != 0 ]; then
# single user mode use this
# to run test clusters
- $LSF_SERVERDIR/lim -1
- echo "lim -1 started"
+ $LSF_SERVERDIR/lim -1
+ [ $? -eq 0 ] \
+ && echo "lim -1 started" \
+ || echo "lim -1 startup failed"
$LSF_SERVERDIR/res -1
- echo "res -1 started"
+ [ $? -eq 0 ] \
+ && echo "res -1 started" \
+ || echo "res -1 startup failed"
$LSF_SERVERDIR/sbatchd -1
- echo "sbatchd -1 started"
+ [ $? -eq 0 ] \
+ && echo "sbatchd -1 started" \
+ || echo "sbatchd -1 startup failed"
else
# multi user mode
$LSF_SERVERDIR/lim
- echo "lim started"
+ [ $? -eq 0 ] \
+ && echo "lim started" \
+ || echo "lim startup failed"
$LSF_SERVERDIR/res
- echo "res started"
+ [ $? -eq 0 ] \
+ && echo "res started" \
+ || echo "res startup failed"
$LSF_SERVERDIR/sbatchd
- echo "sbatchd started"
+ [ $? -eq 0 ] \
+ && echo "sbatchd started" \
+ || echo "sbatchd startup failed"
fi
exit 0
fi