Add a try to install_prerequisites ping checks

Sometimes the ping -c1 `hostname -s` fails, but when ssh to the machine
and running the same command it works. Add another try after 5 seconds
if the ping check fails.
As per an IRC conversation, this is not a blocker. The code functions as-is. However, code should be refactored to use `$(...)` at some point.