quick if test so one can just synlink trunk uplinks using qemu-ifup-TRUNKNAME syntax and be done with it

This commit is contained in:
toby 2019-04-26 18:34:16 +00:00
parent 0493a328ff
commit e1eac9c8c7
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@ if [ ${#IFACE} -gt 15 ]; then
echo "interface name too long, mac 14 char: $IFACE"
exit 10
fi
if [[ ${0##*/} == qemu-ifup-* ]]; then
PARENTIF="${0##*-}"
echo "legacy VLAN trunk mode using $PARENTIF as uplink"
fi
VNI=$(printf '%d' $((16#${IFACE##*.})))