diff options
Diffstat (limited to 'package/base-files')
-rwxr-xr-x[-rw-r--r--] | package/base-files/extra/etc/network/if-pre-up.d/01-atm | 14 | ||||
-rw-r--r-- | package/base-files/extra/etc/network/if-up.d/01-bridge | 3 |
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 |