From: Andrew Tridgell Date: Wed, 6 Jun 2007 01:27:06 +0000 (+1000) Subject: fixed error handling in event scripts X-Git-Tag: tevent-0.9.20~348^2~2554 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4f764c2692592b9f74496779b71692480322058;p=thirdparty%2Fsamba.git fixed error handling in event scripts (This used to be ctdb commit d645c8b0480e7d2765614a226d78510e100016de) --- diff --git a/ctdb/config/events b/ctdb/config/events index e60643da03d..cc74a6c8715 100755 --- a/ctdb/config/events +++ b/ctdb/config/events @@ -39,8 +39,8 @@ esac # call all application or local scripts [ -d /etc/ctdb/events.d ] && { # only accept scripts of the form NN.name - /bin/ls /etc/ctdb/events.d | /bin/grep '^[0-9]*\.\w*$' | sort -n | - while read SCRIPT; do + scripts=`/bin/ls /etc/ctdb/events.d | /bin/grep '^[0-9]*\.\w*$' | sort -n` + for SCRIPT in $scripts; do [ -x /etc/ctdb/events.d/$SCRIPT ] && { /etc/ctdb/events.d/$SCRIPT $cmd "$1" "$2" "$3" || exit 1 }