1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh case "$IFACE" in *#[0-9]*) MVLANID="${IFACE##*#}" IF_MVLAN_RAW_DEVICE="${IFACE%#*}" ;; *) ;; esac if [ -n "$IF_MVLAN_RAW_DEVICE" ] then # Kernel new style configuration ip link add link $IF_MVLAN_RAW_DEVICE name $IFACE type macvlan fi