#!/bin/sh . /www/cgi-bin/functions.sh . /www/cgi-bin/language.sh module_name=$(cat /module_name) firmware_version=$(cat /firmware_version) firmware_region=$(cat /firmware_region) connectstatus () { wan_status="Down" port_status=$(cat /tmp/port_status) info_get_wanproto=$($nvram get wan_proto) if [ "$info_get_wanproto" = "dhcp" -o "$info_get_wanproto" = "bigpond" -o "$info_get_wanproto" = "static" ]; then eth1_value=`ifconfig | grep ^eth1` if [ "x$eth1_value" != "x" ]; then [ "$port_status" = "1" ] && wan_status="Up" fi fi if [ "$info_get_wanproto" = "pppoe" -o "$info_get_wanproto" = "pptp" -o "$info_get_wanproto" = "mulpppoe1" ]; then ppp0_value=`ifconfig | grep ^ppp0` if [ "x$ppp0_value" != "x" ]; then [ "$port_status" = "1" ] && wan_status="Up" fi fi # test multi-pppoe if [ "$info_get_wanproto" = "mulpppoe1" ]; then ppp1_value=`ifconfig | grep ^ppp1` if [ "x$ppp1_value" != "x" ]; then [ "$port_status" = "1" ] && wan_status="Up" fi fi echo "$wan_status" } print_cgi_header print_http_header echo '
' echo "Firmware=${firmware_version}${firmware_region}