summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2018-03-07 14:55:46 +0100
committerJonathan Bauer2018-03-07 14:55:46 +0100
commit7dcf615a868fbcb6f52abc2a54cfe70fba7b1e78 (patch)
treef5f463cc05206af80ed039b4b544eeb61d645ae7
parent[conf-tgz] no exit in sourced script.... (diff)
downloadsystemd-init-7dcf615a868fbcb6f52abc2a54cfe70fba7b1e78.tar.gz
systemd-init-7dcf615a868fbcb6f52abc2a54cfe70fba7b1e78.tar.xz
systemd-init-7dcf615a868fbcb6f52abc2a54cfe70fba7b1e78.zip
[ib-conf] if VLAN is configured, use the ip of the vlan interface to
determine the suffix for the ib interface
-rwxr-xr-xbuilder/modules.d/ib-conf/scripts/gen-ib-conf.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/builder/modules.d/ib-conf/scripts/gen-ib-conf.sh b/builder/modules.d/ib-conf/scripts/gen-ib-conf.sh
index f0bd2c7c..b168ce06 100755
--- a/builder/modules.d/ib-conf/scripts/gen-ib-conf.sh
+++ b/builder/modules.d/ib-conf/scripts/gen-ib-conf.sh
@@ -4,6 +4,9 @@ type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
. "/run/openslx/pxe-network.conf"
+# get the IP from the VLAN device if a VLAN is configured
+[ -n "${SLX_VLAN_ID}" ] && SLX_PXE_NETIF="${SLX_PXE_NETIF}.${SLX_VLAN_ID}"
+
IPSUFFIX=$(
ip -4 -o addr show dev "${SLX_PXE_NETIF}" | \
awk '{split($4,a,"/");split(a[1],b,".");print b[3]"."b[4]}'