mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-28 17:05:31 +00:00
Tolerate older bash versions in flowrequest example
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16634 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
@ -13,7 +13,9 @@ touch /tmp/killme.$parpid
|
||||
exec 2> /dev/null
|
||||
while ! grep 'resourcerequest: ok' /tmp/goahead.$parpid > /dev/null; do
|
||||
(
|
||||
mypid=$BASHPID
|
||||
exec 14<>/proc/self/stat
|
||||
read mystat<&14
|
||||
mypid=$(echo $mystat|cut -d " " -f 4)
|
||||
(sleep $(((RANDOM%60)+120)).$((RANDOM%50)); if [ -f /tmp/killme.$parpid ]; then kill -TERM $mypid; fi) &
|
||||
exec awk '{print $0 > "/tmp/goahead.'$parpid'";exit}' <&13
|
||||
)
|
||||
|
Reference in New Issue
Block a user