Comment 4 for bug 1056927

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

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