summaryrefslogtreecommitdiffstats
path: root/main/vlan/mvlan.pre-up
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-15 13:35:13 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-15 13:35:13 +0000
commit9146859d63fb9bc88018664950a7d70086ec51eb (patch)
treea03c9c4b7b0944b8042d8e9dff63370e1a023548 /main/vlan/mvlan.pre-up
parent36681224a041c8256f2054f62d7b075743c9c1c6 (diff)
downloadaports-9146859d63fb9bc88018664950a7d70086ec51eb.tar.bz2
aports-9146859d63fb9bc88018664950a7d70086ec51eb.tar.xz
main/vlan: move from testing
Diffstat (limited to 'main/vlan/mvlan.pre-up')
-rw-r--r--main/vlan/mvlan.pre-up14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/vlan/mvlan.pre-up b/main/vlan/mvlan.pre-up
new file mode 100644
index 000000000..6713f3115
--- /dev/null
+++ b/main/vlan/mvlan.pre-up
@@ -0,0 +1,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