diff options
author | Jonathan Bauer | 2019-08-26 12:52:19 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-08-26 12:52:19 +0200 |
commit | 5a45aafe03fbf46157b6b1fe524668e6dc285d42 (patch) | |
tree | c59d474214837322a213870e8e10b489a5ad12bc /builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 | |
parent | [slx-dmsetup] remove quotes (diff) | |
download | systemd-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.stage4')
-rwxr-xr-x | builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 index b51328ca..0a67526f 100755 --- a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 +++ b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 @@ -12,8 +12,13 @@ if [ -z "$SLX_PXE_NETIF" ] || [ -z "$SLX_PXE_CLIENT_IP" ]; then exit 1 fi +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 + RESOLV_CONF="/opt/openslx/resolv.conf" -THIS_RESOLV="/run/network/${SLX_PXE_NETIF}.resolv" +THIS_RESOLV="/run/network/${MAIN_NETIF}.resolv" rebuild_resolv_conf () { # Don't do anything if the active resolv.conf is not ours @@ -48,7 +53,7 @@ check_env() { fi # only run for the boot network interface # TODO VLAN support - if [ "$interface" != "${SLX_BRIDGE:-${SLX_PXE_NETIF}}" ]; then + if [ "$interface" != "$MAIN_NETIF" ]; then echo "Ignoring '$interface'..." exit 1 fi |