link executor: Add dependency between veth pairs
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
parent
f708bb1465
commit
3035627c93
1 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue