#!/bin/sh . /www/cgi-bin/functions.sh . /www/cgi-bin/language.sh #wan parameters info_get_lanproto=$($nvram get lan_dhcp) if [ "$info_get_lanproto" = 1 ];then info_get_lanip=$($nvram get lan_ipaddr) info_get_lanmask=$($nvram get lan_netmask) info_get_gateway=$($nvram get lan_gateway) if [ "x$info_get_lanip" = "x" -o "$info_get_lanip" = "0.0.0.0" -o "$info_get_lanip" = "192.168.1.250" ];then info_get_lanmask="0.0.0.0" info_get_gateway="0.0.0.0" fi info_get_dns_assign=$($nvram get lan_ether_dns_assign) elif [ "$info_get_lanproto" = "static" ];then info_get_lanip=$($nvram get lan_ipaddr) info_get_lanmask=$($nvram get lan_netmask) info_get_gateway=$($nvram get lan_gateway) info_get_dns_assign=$($nvram get lan_ether_dns_assign) fi if [ -f /tmp/resolv.conf ];then info_get_dns1=$(cat /tmp/resolv.conf | awk '/nameserver/{printf $2 "\n"}' | sed -n 1p) info_get_dns2=$(cat /tmp/resolv.conf | awk '/nameserver/{printf $2 "\n"}' | sed -n 2p) else info_get_dns1="0.0.0.0" info_get_dns2="0.0.0.0" fi if [ "x$info_get_lanip" = "x" ];then info_get_lanip="0.0.0.0" fi if [ "$info_get_lanip" = "0.0.0.0" ];then if [ "$info_get_dns_assign" = "0" ];then info_get_dns1="0.0.0.0" info_get_dns2="0.0.0.0" fi fi if [ "$info_get_dns1" = "$info_get_dns2" ];then info_get_dns2="" fi print_cgi_header print_http_header "/funcs.js" echo "" print_table_header "" cat < var info_get_lanip="$info_get_lanip"; function changepage() { var cf = document.forms[0]; if( "$info_get_lanip" != "192.168.1.250" ) setTimeout("window.location.replace('http://www.netgear.com/Success/wn2000rpt.aspx')",5000); else setTimeout("window.location.replace('testpage.html')",2500); } changepage(); EOF print_http_footer