Commit 7ad5bcc7 authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: if no method to get management port's IP is selected use DHCP

In case there is no info how to get management port's IP in dot-config, use
DHCP by default.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 62b3ba79
......@@ -58,6 +58,8 @@ if [ "$CONFIG_ETH0_DHCP_ONCE" ]; then
if [ $? -ne 0 ]; then
echo "Failed to obtain IP address via DHCP, set static IP"
CONFIG_ETH0_STATIC="y"
else
exit
fi
fi
......@@ -65,10 +67,10 @@ if [ "$CONFIG_ETH0_STATIC" ]; then
# ifup to use static parameters from /etc/netwrok/interfaces
echo "Using static IP"
ifup eth0
exit
fi
if [ "$CONFIG_ETH0_DHCP" ]; then
# try to get IP via dhcp if failed run dhcp client forever in background
echo "Using DHCP to get IP"
udhcpc -b -i eth0
fi
# Try to get IP via dhcp if failed run dhcp client forever in background.
# If no information how to get IP address is available use this option.
echo "Using DHCP to get IP"
udhcpc -b -i eth0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment