summaryrefslogtreecommitdiff
path: root/package/base-files/extra/etc/network
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-12-29 20:20:33 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2009-12-29 20:20:33 +0100
commit48ed66e5cb97df911aaf2d45200b5f1113e8261d (patch)
tree0b04a353c1dd7f9ca90bbbdd22b0a97ca29c5b5e /package/base-files/extra/etc/network
parent7a545ad720f1f8823d6e3dd0e51e1fa9dff237b1 (diff)
make dsl work via ifup, add vlan support
add kernel vlan support.
Diffstat (limited to 'package/base-files/extra/etc/network')
-rwxr-xr-x[-rw-r--r--]package/base-files/extra/etc/network/if-pre-up.d/01-atm14
-rw-r--r--package/base-files/extra/etc/network/if-up.d/01-bridge3
2 files changed, 10 insertions, 7 deletions
diff --git a/package/base-files/extra/etc/network/if-pre-up.d/01-atm b/package/base-files/extra/etc/network/if-pre-up.d/01-atm
index 08baf73c7..0abf9d368 100644..100755
--- a/package/base-files/extra/etc/network/if-pre-up.d/01-atm
+++ b/package/base-files/extra/etc/network/if-pre-up.d/01-atm
@@ -5,14 +5,14 @@ then
exit 0
fi
-[ "$METHOD" == "atm" ] || exit 0
+[ "${IFACE%%[0-9]*}" = "nas" ] || exit 0
[ "$IF_ATM_ENCAPS" ] || encap=0
[ "$IF_ATM_PAYLOAD" ] || payload=1
-[ "$IF_ATM_VPI" ] || $IF_ATM_VPI=1
-[ "$IF_ATM_VCI" ] || $IF_ATM_VCI=32
+[ "$IF_ATM_VPI" ] || IF_ATM_VPI=1
+[ "$IF_ATM_VCI" ] || IF_ATM_VCI=32
-case "$IF_ATM_PAYLOAD" in
+[ "$IF_ATM_PAYLOAD" ] && case "$IF_ATM_PAYLOAD" in
bridged)
payload=1
;;
@@ -25,7 +25,7 @@ routed)
;;
esac
-case "$IF_ATM_ENCAPS" in
+[ "$IF_ATM_ENCAPS" ] && case "$IF_ATM_ENCAPS" in
llc)
encap=0
;;
@@ -38,6 +38,6 @@ vc)
;;
esac
-br2684ctl -b -c 0 -e $encap -p $payload -a $IF_ATM_VPI.$IF_ATM_VCI
-ifconfig nas0 up
+br2684ctl -b -c ${IFACE##*[a-z]} -e $encap -p $payload -a $IF_ATM_VPI.$IF_ATM_VCI
+ifconfig nas${IFACE##*[a-z]} up
exit 0
diff --git a/package/base-files/extra/etc/network/if-up.d/01-bridge b/package/base-files/extra/etc/network/if-up.d/01-bridge
new file mode 100644
index 000000000..786efe0f8
--- /dev/null
+++ b/package/base-files/extra/etc/network/if-up.d/01-bridge
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+[ "${IFACE%%[0-9]*}" = "br" ] && ip link set up dev $IFACE