summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3
diff options
context:
space:
mode:
Diffstat (limited to 'builder/modules.d/slx-network/scripts/setup-bootif-network.stage3')
-rwxr-xr-xbuilder/modules.d/slx-network/scripts/setup-bootif-network.stage310
1 files changed, 6 insertions, 4 deletions
diff --git a/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3 b/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3
index b98829e9..4535ccd3 100755
--- a/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3
+++ b/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3
@@ -81,10 +81,12 @@ if [ -n "$SLX_BRIDGE" ]; then
fi
# finally add the IP address on the main NIC
-ip addr add \
- "${SLX_PXE_CLIENT_IP}/$(ipcalc -s -p "$SLX_PXE_CLIENT_IP" "$SLX_PXE_NETMASK" | sed "s/.*=//")" \
- broadcast "$(ipcalc -s -b "$SLX_PXE_CLIENT_IP" "$SLX_PXE_NETMASK" | sed "s/.*=//")" \
- dev "$MAIN_NETIF"
+if [ -n "$SLX_PXE_CLIENT_IP" ]; then
+ ip addr add \
+ "${SLX_PXE_CLIENT_IP}/$(ipcalc -s -p "$SLX_PXE_CLIENT_IP" "$SLX_PXE_NETMASK" | sed "s/.*=//")" \
+ broadcast "$(ipcalc -s -b "$SLX_PXE_CLIENT_IP" "$SLX_PXE_NETMASK" | sed "s/.*=//")" \
+ dev "$MAIN_NETIF"
+fi
if [ "$USE_DHCP_UUID" = "yes" ] && [ -s "/run/system-uuid" ]; then
UUID="$(cat /run/system-uuid)"