diff options
Diffstat (limited to 'main/vlan/vlan.pre-up')
-rw-r--r-- | main/vlan/vlan.pre-up | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/vlan/vlan.pre-up b/main/vlan/vlan.pre-up index a1a2822376..f72f7cb666 100644 --- a/main/vlan/vlan.pre-up +++ b/main/vlan/vlan.pre-up @@ -36,8 +36,10 @@ if ! [ -d /proc/net/vlan ]; then modprobe 8021q fi -ip link set dev "$RAW_DEVICE" up -ip link add link "$RAW_DEVICE" name "$IFACE" type vlan id "$VLAN_ID" +if ! [ -e /sys/class/net/$IFACE ]; then + ip link set dev "$RAW_DEVICE" up + ip link add link "$RAW_DEVICE" name "$IFACE" type vlan id "$VLAN_ID" +fi if ! ip link show "$IFACE" >/dev/null; then echo "Failed to create vlan device $IFACE on device $RAW_DEVICE with tag $VLAN_ID" |