Thanks, James.
So perhaps adding (a cleaned-up version of) the following would work?
post-start script checkifs() { count=0; virsh net-list | while read line; do count=$((count+1)) if [ $count -lt 3 ]; then continue; fi if echo $line | awk '{ print $3 }' | grep yes > /dev/null 2>&1; then if [ `echo $line | awk '{ print $2 }'` = "inactive" ]; then echo notready return fi fi done echo ready return }
while [ `checkifs` = "notready" ]; do sleep 1 done end script
Thanks, James.
So perhaps adding (a cleaned-up version of) the following would work?
post-start script $((count+ 1))
checkifs() {
count=0;
virsh net-list | while read line; do
count=
if [ $count -lt 3 ]; then continue; fi
if echo $line | awk '{ print $3 }' | grep yes > /dev/null 2>&1; then
if [ `echo $line | awk '{ print $2 }'` = "inactive" ]; then
echo notready
return
fi
fi
done
echo ready
return
}
while [ `checkifs` = "notready" ]; do
sleep 1
done
end script