qemu-ifup: use variable for consistency

This commit is contained in:
toby 2019-03-22 19:55:03 +00:00
parent ff8f9fa025
commit 2b6992eec1
1 changed files with 1 additions and 2 deletions

View File

@ -17,7 +17,6 @@ fi
LOOPBACKIP=$(ip -4 addr show dev lo | grep -Po 'inet \K[\d.]+' | grep -v "^127.0.0.1$")
BRIDGE=br${CLUSTER}
VIF=vxlan${CLUSTER}
[ -z ${PARENTIF:=""} ] || VIF=vlan${CLUSTER} ### if we have a parentif set we're just going to handle it as a legacy old school vlan
ip link set up ${IFACE}
@ -27,7 +26,7 @@ if ! ip link show dev ${VIF} &>/dev/null; then
then
ip link add ${VIF} type vxlan id ${CLUSTER} dstport 4789 local ${LOOPBACKIP} nolearning
else
ip link add link ${PARENTIF} name vlan${CLUSTER} type vlan protocol 802.1q id ${CLUSTER}
ip link add link ${PARENTIF} name ${VIF} type vlan protocol 802.1q id ${CLUSTER}
fi
ip link set up ${VIF}
fi