summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3
diff options
context:
space:
mode:
authorJonathan Bauer2019-08-26 12:52:19 +0200
committerJonathan Bauer2019-08-26 12:52:19 +0200
commit5a45aafe03fbf46157b6b1fe524668e6dc285d42 (patch)
treec59d474214837322a213870e8e10b489a5ad12bc /builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3
parent[slx-dmsetup] remove quotes (diff)
downloadsystemd-init-5a45aafe03fbf46157b6b1fe524668e6dc285d42.tar.gz
systemd-init-5a45aafe03fbf46157b6b1fe524668e6dc285d42.tar.xz
systemd-init-5a45aafe03fbf46157b6b1fe524668e6dc285d42.zip
[slx-network] initial VLAN support
Diffstat (limited to 'builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3')
-rwxr-xr-xbuilder/modules.d/slx-network/scripts/udhcpc-trigger.stage37
1 files changed, 6 insertions, 1 deletions
diff --git a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3 b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3
index 2621b76f..a561ed66 100755
--- a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3
+++ b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3
@@ -9,8 +9,13 @@ set -x
NETWORK_CONF="/run/openslx/network.conf"
. "$NETWORK_CONF"
+MAIN_NETIF="$SLX_PXE_NETIF"
+[ -n "$SLX_VLAN_ID" ] && MAIN_NETIF="${SLX_PXE_NETIF}.${SLX_VLAN_ID}"
+[ -n "$SLX_BRIDGE" ] && MAIN_NETIF="$SLX_BRIDGE"
+readonly MAIN_NETIF
+
if [ "x$1" != "xbound" -a "x$1" != "xrenew" ] \
- || [ "x$interface" != "x${SLX_BRIDGE:-${SLX_PXE_NETIF}}" ] \
+ || [ "x$interface" != "x${MAIN_NETIF}" ] \
|| [ -z "$ip" ]; then
exit 0
fi