summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-08-27 14:21:08 +0200
committerJonathan Bauer2019-08-27 14:21:08 +0200
commit36874847061a9bcd906ab271e314c7f1dbebf5b9 (patch)
treef29a774a530849a42f9034c58e6302f5be79efef
parent[slx-network] no domain for forced hostname (diff)
downloadsystemd-init-36874847061a9bcd906ab271e314c7f1dbebf5b9.tar.gz
systemd-init-36874847061a9bcd906ab271e314c7f1dbebf5b9.tar.xz
systemd-init-36874847061a9bcd906ab271e314c7f1dbebf5b9.zip
[slx-network] only try to set ip address
-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)"