]>
git.proxmox.com Git - pve-manager.git/blob - vlan
3 # Most of this stuff is to enable vlans, it's really only needed by bridge_utils
5 # Ignore any alias (#272891) which uses <interface>:<alabel>
10 VLANID
=`echo $IFACE|sed "s/vlan*//"`
13 # Silently ignore interfaces which ifupdown handles on its own
14 # If IF_BRIDGE_PORTS is set, probably we're called by bridge-utils
15 [ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0
16 VLANID
=`echo $IFACE|sed "s/[a-zA-Z0-9]*\.//g"`
17 IF_VLAN_RAW_DEVICE
=`echo $IFACE|sed "s/\([a-zA-Z0-9]*\)\..*/\1/"`
25 if [ -n "$IF_VLAN_RAW_DEVICE" ]; then
26 if ! ip link show dev
"$IF_VLAN_RAW_DEVICE" > /dev
/null
; then
27 echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE"
30 if [ ! -e "/sys/class/net/$IFACE" ]; then
31 ip link
set up dev
$IF_VLAN_RAW_DEVICE
32 ip link add link
$IF_VLAN_RAW_DEVICE name
$IFACE type vlan id
$VLANID
37 # This is not vlan specific, and should actually go somewhere else.
38 if [ -n "$IF_HW_MAC_ADDRESS" ]; then
39 ip link
set $IFACE address
$IF_HW_MAC_ADDRESS