summaryrefslogtreecommitdiff
path: root/package/base-files/extra/etc/network
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/extra/etc/network')
-rwxr-xr-xpackage/base-files/extra/etc/network/if-post-down.d/01-bridge (renamed from package/base-files/extra/etc/network/if-post-down.d/bridge)0
-rw-r--r--package/base-files/extra/etc/network/if-pre-up.d/01-atm43
-rwxr-xr-xpackage/base-files/extra/etc/network/if-pre-up.d/02-bridge (renamed from package/base-files/extra/etc/network/if-pre-up.d/bridge)0
3 files changed, 43 insertions, 0 deletions
diff --git a/package/base-files/extra/etc/network/if-post-down.d/bridge b/package/base-files/extra/etc/network/if-post-down.d/01-bridge
index eda1fe3bf..eda1fe3bf 100755
--- a/package/base-files/extra/etc/network/if-post-down.d/bridge
+++ b/package/base-files/extra/etc/network/if-post-down.d/01-bridge
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
new file mode 100644
index 000000000..08baf73c7
--- /dev/null
+++ b/package/base-files/extra/etc/network/if-pre-up.d/01-atm
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+if [ ! -x /usr/sbin/br2684ctl ]
+then
+ exit 0
+fi
+
+[ "$METHOD" == "atm" ] || 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
+
+case "$IF_ATM_PAYLOAD" in
+bridged)
+ payload=1
+ ;;
+routed)
+ payload=0
+ ;;
+*)
+ echo "Wrong payload, use either bridged or routed"
+ exit 1
+ ;;
+esac
+
+case "$IF_ATM_ENCAPS" in
+llc)
+ encap=0
+ ;;
+vc)
+ encap=1
+ ;;
+*)
+ echo "Wrong Encapsulation use either llc or vc"
+ exit 1
+ ;;
+esac
+
+br2684ctl -b -c 0 -e $encap -p $payload -a $IF_ATM_VPI.$IF_ATM_VCI
+ifconfig nas0 up
+exit 0
diff --git a/package/base-files/extra/etc/network/if-pre-up.d/bridge b/package/base-files/extra/etc/network/if-pre-up.d/02-bridge
index 766084de1..766084de1 100755
--- a/package/base-files/extra/etc/network/if-pre-up.d/bridge
+++ b/package/base-files/extra/etc/network/if-pre-up.d/02-bridge