fix ifup/down for ppp-based stuff
authorFelix Fietkau <nbd@openwrt.org>
Sat, 19 Nov 2005 14:53:21 +0000 (14:53 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 19 Nov 2005 14:53:21 +0000 (14:53 +0000)
SVN-Revision: 2536

openwrt/package/base-files/default/etc/hotplug.d/net/10-net
openwrt/package/base-files/default/sbin/ifdown
openwrt/package/base-files/default/sbin/ifup

index 29df1d2ce8322e2b3422ab47e9f31e66f6e4d289..3bc980f86f02110468ef7dc8d6295f9f515566d7 100644 (file)
@@ -175,8 +175,8 @@ do_unregister() {
        
        case "$IFPROTO" in
                pppoe|pppoa|pptp) 
-                       killall ifup.${IFPROTO}
-                       killall pppd
+                       killall ifup.${IFPROTO} 2>&- >&-
+                       killall pppd 2>&- >&-
                ;;
                dhcp)
                        [ -f /var/run/${INTERFACE}.pid ] && kill "$(cat /var/run/${INTERFACE}.pid)" 2>&- >&-
index 3ebc251f72034afb17fcddf031fe1b9ead915907..8818d46145c532c6d400c61f338aaffeafc5971b 100755 (executable)
@@ -12,12 +12,7 @@ if=$(nvram get ${type}_ifname)
 
 case "$if_proto" in
        pppoa) hotplug_dev unregister atm0; exit 0 ;;
-       pppoe) 
-               [ "$(nvram get pppoe_atm)" = 1 ] && {
-                       hotplug_dev unregister atm0
-                       exit
-               }
-       ;;
+       ""|none) exit 0;;
 esac
 
 if [ "${if%%[0-9]}" = "br" ]; then
index 0d75cefeb6ca842b3361703515a6d8874492251b..0a2cdf5331ccc85ef63ec56b5f761ee0cb47e372 100755 (executable)
@@ -14,12 +14,13 @@ if=$(nvram get ${type}_ifname)
 
 case "$if_proto" in
        pppoa) hotplug_dev register atm0; exit 0 ;;
-       pppoe) 
-               [ "$(nvram get pppoe_atm)" = 1 ] && {
+       pppoe)
+               ifconfig nas0 2>&- >&- || {
                        hotplug_dev register atm0
-                       exit
+                       exit 0
                }
        ;;
+       none|"") exit 0;;
 esac
 
 if [ "${if%%[0-9]}" = "br" ]; then