From 552062c9a13a35bf20850db22815e482c3f3b464 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:41:56 -0400 Subject: [PATCH] Add wait for networking to be ready --- install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index cbbcb73..e736d39 100755 --- a/install.sh +++ b/install.sh @@ -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