From: Felix Fietkau Date: Sat, 22 Oct 2005 23:00:01 +0000 (+0000) Subject: fix several bugs in the wan page X-Git-Tag: whiterussian_rc4~83 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2d6824eb46eac257aacc6f3b510c9ae1dbf76e2f;p=openwrt%2Fsvn-archive%2Fopenwrt.git fix several bugs in the wan page SVN-Revision: 2268 --- diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/wan.sh b/openwrt/package/webif/files/www/cgi-bin/webif/wan.sh index efad4d114d..b910491f1e 100755 --- a/openwrt/package/webif/files/www/cgi-bin/webif/wan.sh +++ b/openwrt/package/webif/files/www/cgi-bin/webif/wan.sh @@ -12,7 +12,6 @@ handle_list "$FORM_dnsremove" "$FORM_dnsadd" "$FORM_dnssubmit" 'ip|FORM_dnsadd|W } FORM_dnsadd=${FORM_dnsadd:-192.168.1.1} - if empty "$FORM_submit"; then FORM_wan_proto=${wan_proto:-$(nvram get wan_proto)} case "$FORM_wan_proto" in @@ -22,16 +21,6 @@ if empty "$FORM_submit"; then *) FORM_wan_proto="none";; esac - # detect pptp package and compile option - [ -x /sbin/ifup.pptp ] && { - PPTP_OPTION="radio|wan_proto|$FORM_wan_proto|pptp|PPTP
" - PPTP_SERVER_OPTION="field|PPTP Server IP|pptp_server_ip|hidden -text|pptp_server_ip|$FORM_pptp_server_ip" - } - [ -x /sbin/ifup.pppoe ] && { - PPPOE_OPTION="radio|wan_proto|$FORM_wan_proto|pppoe|PPPoE
" - } - # pptp, dhcp and static common FORM_wan_ipaddr=${wan_ipaddr:-$(nvram get wan_ipaddr)} FORM_wan_netmask=${wan_netmask:-$(nvram get wan_netmask)} @@ -102,6 +91,10 @@ EOF save_setting network ppp_idletime "$FORM_ppp_idletime" save_setting network ppp_redialperiod "$FORM_ppp_redialperiod" save_setting network ppp_mtu "$FORM_ppp_mtu" + + save_setting network wan_ifname "ppp0" + save_setting network pptp_ifname "vlan1" + save_setting network pppoe_ifname "vlan1" case "$FORM_ppp_redial" in demand) @@ -112,10 +105,24 @@ EOF ;; esac ;; + *) + save_setting network wan_ifname "vlan1" + ;; esac } fi +# detect pptp package and compile option +[ -x /sbin/ifup.pptp ] && { + PPTP_OPTION="radio|wan_proto|$FORM_wan_proto|pptp|PPTP
" + PPTP_SERVER_OPTION="field|PPTP Server IP|pptp_server_ip|hidden +text|pptp_server_ip|$FORM_pptp_server_ip" +} +[ -x /sbin/ifup.pppoe ] && { + PPPOE_OPTION="radio|wan_proto|$FORM_wan_proto|pppoe|PPPoE
" +} + + header "Network" "WAN" "WAN settings" ' onLoad="modechange()" ' "$SCRIPT_NAME" cat <