ignore the failed if_valid check for ppp protocols except for pppoe (fixes ifup.wwan)
authorFelix Fietkau <nbd@openwrt.org>
Fri, 3 Nov 2006 09:22:03 +0000 (09:22 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 3 Nov 2006 09:22:03 +0000 (09:22 +0000)
SVN-Revision: 5408

openwrt/package/base-files/default/sbin/ifup

index 8bb56a5c5c29985076993b4a66d2233f868c024d..a4df8339db8b64feea197c85fd8953de0642dbe6 100755 (executable)
@@ -9,9 +9,15 @@ case "$if_proto" in
        none|"")exit;;
 esac
 if=$(nvram get ${type}_ifname)
-[ "${if%%[0-9]}" = "ppp" ] && if=$(nvram get ${type}_device)
+if [ "${if%%[0-9]}" = "ppp" ]; then
+       if=$(nvram get ${type}_device)
+       if_valid "$if" || {
+               [ "$if_proto" = "pppoe" ] && exit
+       }
+else
+       if_valid "$if" || exit
+fi
 
-if_valid $if || [ "$if_proto" = "pptp" ] || exit 
 mac=$(nvram get ${type}_hwaddr)
 $DEBUG ifconfig $if down 2>&-