From: Andrew M. <fit...@us...> - 2006-11-07 16:24:58
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26873 Modified Files: ra.sh Log Message: Fixes for Gab's ra.sh update infinite loop. Check return value of read to handle EOF. Fix typo processing postapply scripts. Index: ra.sh =================================================================== RCS file: /cvsroot/radmind/radmind/ra.sh,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ra.sh 19 Jul 2006 20:17:51 -0000 1.31 --- ra.sh 7 Nov 2006 16:24:53 -0000 1.32 *************** *** 88,91 **** --- 88,96 ---- } + cleanup_and_exit() { + cleanup + exit 1 + fi + dopreapply() { if [ -d ${PREAPPLY} ]; then *************** *** 199,202 **** --- 204,211 ---- read ans + if [ $? -ne 0 ]; then + cleanup_and_exit + fi + case "${ans}" in a|A) *************** *** 219,222 **** --- 228,232 ---- *) ;; + esac done *************** *** 245,249 **** Yn "Run post-apply scripts on difference transcript?" if [ $? -eq 1 ]; then ! dopostapply ${FMTP} fi elif [ x"$opt" != x"interactive" ]; then --- 255,259 ---- Yn "Run post-apply scripts on difference transcript?" if [ $? -eq 1 ]; then ! dopostapply ${FTMP} fi elif [ x"$opt" != x"interactive" ]; then *************** *** 320,324 **** # Trap meaningful signals ! trap cleanup HUP INT PIPE QUIT TERM TRAP XCPU XFSZ case "$1" in --- 330,334 ---- # Trap meaningful signals ! trap cleanup_and_exit HUP INT PIPE QUIT TERM TRAP XCPU XFSZ case "$1" in |