fix ifup/down for ppp-based stuff
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 19 Nov 2005 14:53:21 +0000 (14:53 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 19 Nov 2005 14:53:21 +0000 (14:53 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2536 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index 29df1d2..3bc980f 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 3ebc251..8818d46 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 0d75cef..0a2cdf5 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
This page took 0.027213 seconds and 4 git commands to generate.