Add wait for networking to be ready

This commit is contained in:
Joshua Boniface 2021-09-09 13:51:47 -04:00 committed by Joshua Boniface
parent ca9796ef51
commit c34167a01f
1 changed files with 9 additions and 1 deletions

View File

@ -200,7 +200,7 @@ EOF
'dhcp')
if [[ -n ${vlan_id} ]]; then
modprobe 8021q >&2
vconfig add ${target_interface} ${vlan_id} >&2
vconfig add ${target_interface} ${vlan_id} &>/dev/null
vlan_interface=${target_interface}.${vlan_id}
target_interfaces_block="auto ${vlan_interface}\niface ${vlan_interface} inet ${target_netformat}\n\tvlan_raw_device${target_interface}"
dhclient ${vlan_interface} >&2
@ -215,6 +215,13 @@ esac
echo "done."
echo
echo -n "Waiting for networking to become ready... "
while ! ping -q -c 1 8.8.8.8 &>/dev/null; do
sleep 1
done
echo "done."
echo
echo "4a) Please enter an alternate Debian release codename for the system if desired."
echo " Supported: ${supported_debrelease}"
echo " Default: ${default_debrelease}"
@ -244,6 +251,7 @@ while [[ -z ${debmirror} ]]; do
debmirror="${default_debmirror}"
fi
if ! wget -O /dev/null ${debmirror}/dists/${debrelease}/Release &>/dev/null; then
debmirror=""
echo
echo "Please enter a valid Debian mirror URL."
continue