mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 02:52:07 +00:00
Be more patient and more noisy about DHCP attempt over time
This commit is contained in:
parent
0a9fd8351b
commit
0d5f48b116
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user