link executor: don't try to modprobe in mock mode

This commit is contained in:
Ariadne Conill 2020-08-24 11:07:40 -06:00
parent de20e5f8a9
commit b378305286

View file

@ -45,12 +45,12 @@ pre-up|post-down)
echo "Device $IF_VLAN_RAW_DEVICE for $IFACE does not exist" echo "Device $IF_VLAN_RAW_DEVICE for $IFACE does not exist"
exit 1 exit 1
fi fi
fi
if ! [ -d /proc/net/vlan ]; then if ! [ -d /proc/net/vlan ]; then
echo "Loading 8021q kernel module for VLAN support" echo "Loading 8021q kernel module for VLAN support"
${MOCK} modprobe 8021q ${MOCK} modprobe 8021q
fi fi
fi
${MOCK} ip link $ADD_DEL link "$IF_VLAN_RAW_DEVICE" name "$IFACE" type vlan id "$IF_VLAN_ID" ${MOCK} ip link $ADD_DEL link "$IF_VLAN_RAW_DEVICE" name "$IFACE" type vlan id "$IF_VLAN_ID"
[ "$UP_DOWN" = "down" ] && exit 0 [ "$UP_DOWN" = "down" ] && exit 0