diff --git a/virtualbox/functions/product.sh b/virtualbox/functions/product.sh index 37ff905f8..cbc19f57d 100755 --- a/virtualbox/functions/product.sh +++ b/virtualbox/functions/product.sh @@ -249,18 +249,19 @@ enable_outbound_network_for_product_vm() { expect "$prompt" send "dockerctl restart cobbler >/dev/null 2>&1\r" expect "$prompt" - send "dockerctl check cobbler >/dev/null 2>&1\r" - expect "*ready*" - expect "$prompt" send "service network restart >/dev/null 2>&1\r" expect "*OK*" expect "$prompt" + send "dockerctl restart cobbler >/dev/null 2>&1\r" + expect "$prompt" + send "dockerctl check cobbler >/dev/null 2>&1\r" + expect "*ready*" + expect "$prompt" send "for i in 1 2 3 4 5; do ping -c 2 google.com || ping -c 2 wikipedia.com || sleep 2; done\r" expect "*icmp*" expect "$prompt" ENDOFEXPECT ) - # When you are launching command in a sub-shell, there are issues with IFS (internal field separator) # and parsing output as a set of strings. So, we are saving original IFS, replacing it, iterating over lines, # and changing it back to normal