diff --git a/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh b/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh index b90729e2..98c8eaf0 100644 --- a/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh +++ b/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh @@ -110,6 +110,11 @@ if [ ! -z "$confluentsrv" ]; then ifname=$(ip -br link|grep LOWER_UP|grep -v UNKNOWN|head -n 1|awk '{print $1}') echo -n "Attempting to use dhcp to bring up $ifname..." dhclient $ifname + while ! ip -br addr show dev $ifname | grep \\ . > /dev/null; do + echo -n "Still waiting for IPv4 address on: " + ip -br link show dev $ifname + sleep 1 + done echo -n "Complete: " ip -br addr show dev $ifname DIDDHCP=1 @@ -204,6 +209,11 @@ if [ "$autoconfigmethod" = "dhcp" ]; then if [ "$DIDDHCP" = "0" ]; then echo -n "Attempting to use dhcp to bring up $ifname..." dhclient $ifname + while ! ip -br addr show dev $ifname | grep \\ . > /dev/null; do + echo -n "Still waiting for IPv4 address on: " + ip -br link show dev $ifname + sleep 1 + done echo -n "Complete: " ip -br addr show dev $ifname fi