diff options
Diffstat (limited to 'package')
-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 | ||||
-rw-r--r-- | package/mtd/src/mtd.c | 2 |
3 files changed, 11 insertions, 8 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 diff --git a/package/mtd/src/mtd.c b/package/mtd/src/mtd.c index 1230688b1..bd5b50dab 100644 --- a/package/mtd/src/mtd.c +++ b/package/mtd/src/mtd.c @@ -277,7 +277,7 @@ main(int argc, char **argv) buflen = 0; quiet = 0; - while ((ch = getopt(argc, argv, "Fqe:")) != -1) + while ((ch = getopt(argc, argv, "Fqre:")) != -1) switch (ch) { case 'F': quiet = 1; |