summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Graber <stgraber@ubuntu.com>2011-12-20 12:00:44 +0100
committerStéphane Graber <stgraber@ubuntu.com>2011-12-20 12:00:44 +0100
commitf254efaaa7540e83f6d17b6699c3ceff903c4bbf (patch)
treec5c2743e94aff9af8fe82a0f4e9058ef559ceac5
parentd11ebf91f9086fb540461345e314f9ec7464645d (diff)
Import Debian changes 1.9-3ubuntu4
vlan (1.9-3ubuntu4) precise; urgency=low * Add a udev trigger similar to bridge-utils' so vlan interfaces are created when the parent appears (this will then trigger upstart and ifupdown to configure the newly created vlan interface)
-rw-r--r--debian/changelog8
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/vlan-network-interface29
-rw-r--r--debian/vlan.install1
-rw-r--r--debian/vlan.vlan-network-interface.udev1
5 files changed, 41 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index aadc04f..b8f8f19 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+vlan (1.9-3ubuntu4) precise; urgency=low
+
+ * Add a udev trigger similar to bridge-utils' so vlan interfaces are
+ created when the parent appears (this will then trigger upstart and
+ ifupdown to configure the newly created vlan interface)
+
+ -- Stéphane Graber <stgraber@ubuntu.com> Tue, 20 Dec 2011 12:00:44 +0100
+
vlan (1.9-3ubuntu3) lucid; urgency=low
* debian/control: Make vlan-udeb depend on vlan-modules (kernel modules).
diff --git a/debian/rules b/debian/rules
index 735776c..c2e9dd8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,11 +5,13 @@ CCFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
binary-arch:
dh_testdir
dh_testroot
+ dh_installudev --name vlan-network-interface
dh_installdocs -s
dh_installman -s
dh_installchangelogs -s CHANGELOG
dh_install -s
chmod -R 755 debian/vlan/etc/network
+ chmod 755 debian/vlan/lib/udev/vlan-network-interface
dh_strip -s
dh_fixperms -s
dh_compress -s
diff --git a/debian/vlan-network-interface b/debian/vlan-network-interface
new file mode 100644
index 0000000..5ded09f
--- /dev/null
+++ b/debian/vlan-network-interface
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# vlan-network-interface - configure a network bridge
+#
+# This service checks whether a physical network device that has been added
+# has VLAN defined in /etc/network/interfaces that should be brought up
+set -e
+
+if [ -z "$INTERFACE" ]; then
+ echo "missing \$INTERFACE" >&2
+ exit 1
+fi
+
+if ! which ifquery >/dev/null; then
+ exit 0
+fi
+
+if [ ! -x /etc/network/if-pre-up.d/vlan ]; then
+ exit 0
+fi
+
+mkdir -p /run/network
+for IFACE in $(ifquery --list --allow auto); do
+ IF_VLAN_RAW_DEVICE=$(ifquery $IFACE | sed -n -e's/^vlan[_-]raw[_-]device: //p')
+
+ # Now that the environment is ready, call the pre-up script to create the vlan
+ export IFACE IF_VLAN_RAW_DEVICE
+ /etc/network/if-pre-up.d/vlan
+done
diff --git a/debian/vlan.install b/debian/vlan.install
index c29eacf..6bf49c0 100644
--- a/debian/vlan.install
+++ b/debian/vlan.install
@@ -1,3 +1,4 @@
debian/network etc
+debian/vlan-network-interface lib/udev/
vconfig sbin
#macvlan_config sbin
diff --git a/debian/vlan.vlan-network-interface.udev b/debian/vlan.vlan-network-interface.udev
new file mode 100644
index 0000000..9c293a9
--- /dev/null
+++ b/debian/vlan.vlan-network-interface.udev
@@ -0,0 +1 @@
+ACTION=="add", SUBSYSTEM=="net", RUN+="vlan-network-interface"