diff -ru 0.7.1.2/bin/thinclient 0.7.1.3/bin/thinclient --- 0.7.1.2/bin/thinclient 2006-11-20 21:28:21.000000000 +0900 +++ 0.7.1.3/bin/thinclient 2007-03-23 21:02:18.000000000 +0900 @@ -20,33 +20,23 @@ WLMAC2=$( ifconfig $lan_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) ETMAC=$( ifconfig eth0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) +# gather information about this machine FONREV="$(cat /etc/fon_revision)" FIRMWARE="$(cat /etc/fon_version)" DEVICE="$(cat /etc/fon_device)" +CHILLVER="$(ipkg list_installed|grep chillispot| cut -d\ -f3)" -exec_cron_mode () { - - sleep "$((0x$(head -c2 /dev/urandom | hexdump | awk '$2 > 0 {print $2}') % 3600))" - - echo "mode='cron' wlmac='$WLMAC' mac='$ETMAC' fonrev='$FONREV' firmware='$FIRMWARE'" | ssh -T ${PORT:+ -p $PORT}${KEY:+ -i $KEY} "${USER}@${SERVER}" > /tmp/.thinclient.sh - -} - -exec_start_mode () { - # gather information about this machine - CHILLVER="$(ipkg list_installed|grep chillispot| cut -d\ -f3)" - - echo "mode='start' wlmac='$WLMAC' mac='$ETMAC' fonrev='$FONREV' firmware='$FIRMWARE' chillver='$CHILLVER' thclver='$THCLVER' device='$DEVICE'" | ssh -T ${PORT:+ -p $PORT}${KEY:+ -i $KEY} "${USER}@${SERVER}" > /tmp/.thinclient.sh -} +MODE=$1 rm -f /tmp/.thinclient.sh case "$1" in cron) - exec_cron_mode + sleep "$((0x$(head -c2 /dev/urandom | hexdump | awk '$2 > 0 {print $2}') % 3600))" + echo "mode='$MODE' wlmac='$WLMAC' mac='$ETMAC' fonrev='$FONREV' firmware='$FIRMWARE' chillver='$CHILLVER' thclver='$THCLVER' device='$DEVICE'" | ssh -T ${PORT:+ -p $PORT}${KEY:+ -i $KEY} "${USER}@${SERVER}" > /tmp/.thinclient.sh ;; start) - exec_start_mode + echo "mode='$MODE' wlmac='$WLMAC' mac='$ETMAC' fonrev='$FONREV' firmware='$FIRMWARE' chillver='$CHILLVER' thclver='$THCLVER' device='$DEVICE'" | ssh -T ${PORT:+ -p $PORT}${KEY:+ -i $KEY} "${USER}@${SERVER}" > /tmp/.thinclient.sh ;; *) echo "Usage: `basename $0` {cron|start}" diff -ru 0.7.1.2/etc/banner 0.7.1.3/etc/banner --- 0.7.1.2/etc/banner 2006-12-21 23:40:04.000000000 +0900 +++ 0.7.1.3/etc/banner 2007-03-23 21:02:19.000000000 +0900 @@ -4,7 +4,7 @@ | | |_______||__| |__| |___| - Fonera Firmware (Version 0.7.1 rev 2) ------------- + Fonera Firmware (Version 0.7.1 rev 3) ------------- * * Based on OpenWrt - http://openwrt.org * Powered by FON - http://www.fon.com diff -ru 0.7.1.2/etc/fon_revision 0.7.1.3/etc/fon_revision --- 0.7.1.2/etc/fon_revision 2006-12-21 23:39:58.000000000 +0900 +++ 0.7.1.3/etc/fon_revision 2007-03-23 21:02:19.000000000 +0900 @@ -1 +1 @@ -2 +3 diff -ru 0.7.1.2/etc/functions.sh 0.7.1.3/etc/functions.sh --- 0.7.1.2/etc/functions.sh 2006-11-15 02:44:26.000000000 +0900 +++ 0.7.1.3/etc/functions.sh 2007-03-23 21:02:19.000000000 +0900 @@ -39,9 +39,9 @@ config () { _C=$(($_C + 1)) - name="${name:-cfg${_C}}" - config_cb "$1" "$2" - export CONFIG_SECTION="$2" + name="${2:-cfg${_C}}" + config_cb "$1" "$name" + export CONFIG_SECTION="$name" export CONFIG_${CONFIG_SECTION}_TYPE="$1" } diff -ru 0.7.1.2/etc/init.d/N45ntpclient 0.7.1.3/etc/init.d/N45ntpclient --- 0.7.1.2/etc/init.d/N45ntpclient 2006-12-21 21:57:40.000000000 +0900 +++ 0.7.1.3/etc/init.d/N45ntpclient 2007-03-23 21:02:15.000000000 +0900 @@ -5,29 +5,46 @@ crontab_file="/etc/crontabs/root" ntp_file="/etc/config/ntpservers" -#Flush previous ntp servers... -cat /etc/crontabs/root | grep -v ntp > /etc/crontabs/root - -randline=$(expr `head -c1 /dev/urandom | hexdump -d | sed 's/\ //g' | sed 's/^0*//' | head -n1` % `wc -l $ntp_file | sed 's/^\ [ \t]*//' | cut -d" " -f1`) - -ntpserver=$(head -n$randline $ntp_file | tail -n1) - - - -case "$1" in - "stop") - cat $crontab_file | grep -v "ntp" > $crontab_file - crontab -l - echo stop - return - ;; - *) - ;; -esac - -randminute=$(expr `head -c2 /dev/urandom | hexdump -d | sed 's/\ //g' | sed 's/^0*//' | head -n1` % 60) -randhour=$(expr `head -c2 /dev/urandom | hexdump -d | sed 's/\ //g' | sed 's/^0*//' | head -n1` % 24) -echo "$randminute $randhour * * * ntpclient -s -h $ntpserver" >> $crontab_file -ntpclient -s -h $ntpserver & -crontab -l +config_ntpserver() +{ + verify="false" + while [ "$verify" != "true" ] + do + #Kill them all! + killall ntpclient + #Flush previous ntp servers... + cat /etc/crontabs/root | grep -v ntp > /etc/crontabs/root + randline=$(expr `head -c1 /dev/urandom | hexdump -d | sed 's/\ //g' | sed 's/^0*//' | head -n1` % `wc -l $ntp_file | sed 's/^\ [ \t]*//' | cut -d" " -f1` + 1) + ntpserver=$(head -n$randline $ntp_file | tail -n1) + randminute=$(expr `head -c2 /dev/urandom | hexdump -d | sed 's/\ //g' | sed 's/^0*//' | head -n1` % 60) + randhour=$(expr `head -c2 /dev/urandom | hexdump -d | sed 's/\ //g' | sed 's/^0*//' | head -n1` % 24) + ntpclient -s -h $ntpserver & + sleep 5 + + if [ "`date +%Y`" != "2000" ] + then + verify="true" + fi + done + + echo "$randminute $randhour * * * ntpclient -s -h $ntpserver" >> $crontab_file + crontab -l + +} + + case "$1" in + "start") + config_ntpserver& + ;; + "stop") + cat $crontab_file | grep -v "ntp" > $crontab_file + crontab -l + return + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop}" + exit 1 + ;; + esac + diff -ru 0.7.1.2/usr/lib/qos.sh 0.7.1.3/usr/lib/qos.sh --- 0.7.1.2/usr/lib/qos.sh 2006-09-01 00:32:16.000000000 +0900 +++ 0.7.1.3/usr/lib/qos.sh 2007-03-23 21:02:20.000000000 +0900 @@ -277,6 +277,7 @@ } else { avpkt = 1200 min = int(limit * 1024 / 8 * 0.1) + if (min < avpkt) min = avpkt dqb = cqlen * 1500 max = int(min + (dqb - min) * 0.25) burst = int((2 * min + max) / (3 * avpkt)) @@ -463,6 +464,7 @@ cat <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -97,7 +97,7 @@ end_table start_table|0|10|5 add_row - add_button_cell|submit|@TR<>|tableTextButton + add_button_cell|submit|Submit|tableTextButton end_row end_table EOF diff -ru 0.7.1.2/www/cgi-bin/webif/adv_pf.sh 0.7.1.3/www/cgi-bin/webif/adv_pf.sh --- 0.7.1.2/www/cgi-bin/webif/adv_pf.sh 2006-12-21 22:20:29.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/adv_pf.sh 2007-03-23 21:02:15.000000000 +0900 @@ -4,7 +4,7 @@ . /usr/lib/webif/advanced.sh validate <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -101,13 +101,19 @@ validate <>|min=0|$FORM_sruledel EOF - if [ "$?" != "0" ] + if [ "$?" != "0" -o -z "$FORM_sruledel" ] then NOTICE="@TR<>" else - DELLINE=`head -n $FORM_sruledel /tmp/frules | tail -n 1` - cat /etc/config/openports | grep -v "$DELLINE" > /etc/config/openports - /etc/init.d/S45firewall + nentries=`wc -l /tmp/frules | cut -d" " -f7` + if [ $FORM_sruledel -gt $nentries ] + then + NOTICE="@TR<>" + else + DELLINE=`head -n $FORM_sruledel /tmp/frules | tail -n 1` + cat /etc/config/openports | grep -v "$DELLINE" > /etc/config/openports + /etc/init.d/S45firewall + fi fi fi fi @@ -299,7 +305,7 @@ end_row add_row add_label_cell - add_button_cell|submit|@TR<> + add_button_cell|submit|Add end_row end_table end_div @@ -315,7 +321,7 @@ end_select_cell end_row add_row - add_button_cell|submit|@TR<> + add_button_cell|submit|Delete end_row end_table end_div diff -ru 0.7.1.2/www/cgi-bin/webif/adv_wifi.sh 0.7.1.3/www/cgi-bin/webif/adv_wifi.sh --- 0.7.1.2/www/cgi-bin/webif/adv_wifi.sh 2006-12-21 22:20:29.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/adv_wifi.sh 2007-03-23 21:02:15.000000000 +0900 @@ -3,7 +3,7 @@ . /usr/lib/webif/webif.sh validate <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -83,7 +83,7 @@ end_select_cell end_row add_row - add_button_cell|submit|@TR<>|tableTextButton + add_button_cell|submit|Submit|tableTextButton end_row end_table EOF diff -ru 0.7.1.2/www/cgi-bin/webif/connection.sh 0.7.1.3/www/cgi-bin/webif/connection.sh --- 0.7.1.2/www/cgi-bin/webif/connection.sh 2006-12-22 20:47:40.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/connection.sh 2007-03-23 21:02:15.000000000 +0900 @@ -3,7 +3,7 @@ . /usr/lib/webif/webif.sh validate <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -165,7 +165,7 @@ end_div pptp start_table|0|10|5 - add_button_cell|submit|@TR<> + add_button_cell|submit|Submit end_table EOF diff -ru 0.7.1.2/www/cgi-bin/webif/language.sh 0.7.1.3/www/cgi-bin/webif/language.sh --- 0.7.1.2/www/cgi-bin/webif/language.sh 2006-12-21 22:20:29.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/language.sh 2007-03-23 21:02:15.000000000 +0900 @@ -9,7 +9,7 @@ if [ "$?" != "0" ] then FORM_submit="" -fi + fi FORM_lang=`cat /etc/config/webif | grep lang | cut -d" " -f3` diff -ru 0.7.1.2/www/cgi-bin/webif/password.sh 0.7.1.3/www/cgi-bin/webif/password.sh --- 0.7.1.2/www/cgi-bin/webif/password.sh 2006-12-21 22:20:29.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/password.sh 2007-03-23 21:02:15.000000000 +0900 @@ -3,7 +3,7 @@ . /usr/lib/webif/webif.sh validate <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -53,7 +53,7 @@ add_pass_cell|pw2|tableTextButton end_row add_row - add_button_cell|submit|@TR<> + add_button_cell|submit|Change end_row end_table EOF diff -ru 0.7.1.2/www/cgi-bin/webif/private.sh 0.7.1.3/www/cgi-bin/webif/private.sh --- 0.7.1.2/www/cgi-bin/webif/private.sh 2006-12-21 22:20:29.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/private.sh 2007-03-23 21:02:15.000000000 +0900 @@ -3,7 +3,7 @@ . /usr/lib/webif/webif.sh validate <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -168,7 +168,7 @@ end_div start_table|0|10|5 add_row - add_button_cell|submit|@TR<> + add_button_cell|submit|Submit end_row end_table EOF diff -ru 0.7.1.2/www/cgi-bin/webif/public.sh 0.7.1.3/www/cgi-bin/webif/public.sh --- 0.7.1.2/www/cgi-bin/webif/public.sh 2006-12-21 22:20:29.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/public.sh 2007-03-23 21:02:15.000000000 +0900 @@ -3,7 +3,7 @@ . /usr/lib/webif/webif.sh validate <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -37,7 +37,7 @@ add_input_cell|ssid|$FORM_ssid|tableTextButton end_row add_row - add_button_cell|submit|@TR<> + add_button_cell|submit|Submit end_row end_table EOF diff -ru 0.7.1.2/www/cgi-bin/webif/upgrade.sh 0.7.1.3/www/cgi-bin/webif/upgrade.sh --- 0.7.1.2/www/cgi-bin/webif/upgrade.sh 2006-12-21 22:20:29.000000000 +0900 +++ 0.7.1.3/www/cgi-bin/webif/upgrade.sh 2007-03-23 21:02:15.000000000 +0900 @@ -2,7 +2,7 @@ . /usr/lib/webif/webif.sh validate <>|max=10|$FORM_submit +string|FORM_submit|Submit|max=10|$FORM_submit EOF if [ "$?" != "0" ] @@ -131,7 +131,7 @@ - +