2 # wait for amd to die on local host before returning from program.
3 # Usage: wait4amd2die [delay [count]]
4 # If not specified, delay=5 seconds and count=6 (total 30 seconds)
5 # If at end of total delay amd is till up, return 1; else return 0.
7 # Package: am-utils-6.x
8 # Author: Erez Zadok <ezk@cs.columbia.edu>
14 exec_prefix
=@exec_prefix@
15 PATH
=@sbindir@
:@bindir@
:/usr
/bin
:/bin
:${PATH}
25 # how many times to delay
34 maxcount
=`expr $count + 1`
35 while [ $i != $maxcount ]; do
37 @sbindir@
/amq
> /dev
/null
2>&1
40 # amq failed to run (because amd is dead)
41 echo "wait4amd2die: amd is down!"
44 echo "wait4amd2die: delay $delay sec ($i of $count)..."
48 echo "wait4amd2die: amd is still up..."