diff --git a/executor-scripts/linux/link b/executor-scripts/linux/link index 24db96f..c8c05ce 100755 --- a/executor-scripts/linux/link +++ b/executor-scripts/linux/link @@ -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