qemu-ifup: use variable for consistency
This commit is contained in:
parent
ff8f9fa025
commit
2b6992eec1
|
@ -17,7 +17,6 @@ fi
|
||||||
LOOPBACKIP=$(ip -4 addr show dev lo | grep -Po 'inet \K[\d.]+' | grep -v "^127.0.0.1$")
|
LOOPBACKIP=$(ip -4 addr show dev lo | grep -Po 'inet \K[\d.]+' | grep -v "^127.0.0.1$")
|
||||||
BRIDGE=br${CLUSTER}
|
BRIDGE=br${CLUSTER}
|
||||||
VIF=vxlan${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
|
[ -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}
|
ip link set up ${IFACE}
|
||||||
|
@ -27,7 +26,7 @@ if ! ip link show dev ${VIF} &>/dev/null; then
|
||||||
then
|
then
|
||||||
ip link add ${VIF} type vxlan id ${CLUSTER} dstport 4789 local ${LOOPBACKIP} nolearning
|
ip link add ${VIF} type vxlan id ${CLUSTER} dstport 4789 local ${LOOPBACKIP} nolearning
|
||||||
else
|
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
|
fi
|
||||||
ip link set up ${VIF}
|
ip link set up ${VIF}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue