diff options
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 |