link executor: Add dependency between veth pairs

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-09-25 22:07:10 +02:00
parent f708bb1465
commit 3035627c93

View file

@ -28,6 +28,17 @@ is_vlan() {
}
case "$PHASE" in
depend)
# vlan-raw-device
if is_vlan; then
echo "$IF_VLAN_RAW_DEVICE"
# veth-peer-name
elif [ "${IF_LINK_TYPE}" = "veth" -a "${IF_VETH_PEER_NAME}" ]; then
echo "${IF_VETH_PEER_NAME}"
fi
;;
create)
if [ "${IF_LINK_TYPE}" = "dummy" ]; then
if [ -d "/sys/class/net/${IFACE}" ]; then
@ -94,9 +105,4 @@ destroy)
${MOCK} ip link del "${IFACE}"
fi
;;
depend)
if is_vlan; then
echo "$IF_VLAN_RAW_DEVICE"
fi
;;
esac