diff options
Diffstat (limited to 'src/connections/vlan')
-rw-r--r-- | src/connections/vlan | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/connections/vlan b/src/connections/vlan index acaa399..75c7fa9 100644 --- a/src/connections/vlan +++ b/src/connections/vlan @@ -2,28 +2,24 @@ . /usr/lib/network/network vlan_up() { - local vlan_interface load_profile "$1" if [[ -e "/sys/class/net/$INTERFACE" ]]; then report_fail "Interface $INTERFACE already exists." exit 1 else - ip link set "$VLAN_PHYS_DEV" up - ip link add link "$VLAN_PHYS_DEV" name "$INTERFACE" type vlan id "$VLAN_ID" >/dev/null 2>&1 + bring_interface up "$VLAN_PHYS_DEV" + ip link add link "$VLAN_PHYS_DEV" name "$INTERFACE" type vlan id "$VLAN_ID" fi - bring_interface up "$INTERFACE" "$CONN_DIR/ethernet" up "$1" return 0 } vlan_down() { - local vlan_interface load_profile "$1" "$CONN_DIR/ethernet" down "$1" - bring_interface down "$INTERFACE" - ip link delete "$INTERFACE" >/dev/null 2>&1 + ip link delete "$INTERFACE" return 0 } |