summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2011-02-18 00:51:45 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-02-21 13:46:53 +0100
commitfbd8958d3750d5a258ed8fefe50791c53741c20f (patch)
tree6593cda6595313613e8ff51948a06d3add6f7f9b
parentd3bf36b1f9f54e23f7b4e78f4a3202a5f1da405b (diff)
base-files: fix vlan support for busybox vconfig
The busybox symlinks reside in /bin, so the check fails. Curiously, there is no vconfig package, so vlan support must have been broken since the beginning of time (for OpenADK). :) This patch also adds some error messages when the basic checks fail, useful helpers when debugging what's going wrong. Also, there was some whitespace fuckup in two lines.
-rwxr-xr-xpackage/base-files/src/etc/network/if-pre-up.d/02-vlan14
1 files changed, 10 insertions, 4 deletions
diff --git a/package/base-files/src/etc/network/if-pre-up.d/02-vlan b/package/base-files/src/etc/network/if-pre-up.d/02-vlan
index 35b7fca59..26b33ca80 100755
--- a/package/base-files/src/etc/network/if-pre-up.d/02-vlan
+++ b/package/base-files/src/etc/network/if-pre-up.d/02-vlan
@@ -1,12 +1,18 @@
#!/bin/sh
-[ -x /sbin/vconfig ] || exit 0
-[ -d /proc/net/vlan ] || exit 0
+which vconfig || {
+ echo "vconfig executable not found, aborting"
+ exit 0
+}
+[ -d /proc/net/vlan ] || {
+ echo "no kernel support for 802.1q found, aborting"
+ exit 0
+}
case "$IFACE" in
vlan*)
- vconfig set_name_type VLAN_PLUS_VID_NO_PAD
- VLANID=`echo $IFACE|sed "s/vlan*//"`
+ vconfig set_name_type VLAN_PLUS_VID_NO_PAD
+ VLANID=`echo $IFACE|sed "s/vlan*//"`
;;
eth*.*)
vconfig set_name_type DEV_PLUS_VID_NO_PAD