Changeset 386

Show
Ignore:
Timestamp:
10/19/07 13:38:04 (2 years ago)
Author:
florida
Message:

mise à jour webif avec la revision 3635

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • firmware/trunk/kamikaze/package/webif/Makefile

    r354 r386  
    33PKG_NAME:=webif 
    44PKG_VERSION:=0.3 
    5 PKG_RELEASE:=6 
     5PKG_RELEASE:=5 
    66 
    77PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     
    150150        $(TARGET_CC) $(TARGET_CFLAGS) \ 
    151151                -D_METAPACK \ 
    152                 -I$(STAGING_DIR)/include-host -I$(STAGING_DIR_HOST)/include -include endian.h \ 
     152                -I$(STAGING_DIR)/include-host -include endian.h \ 
    153153                $(TARGET_CFLAGS_EXTRA) \ 
    154154                $(TARGET_LDFLAGS) \ 
     
    171171        rm -rf $(1)/www/themes/sedky1/ 
    172172        rm -f $(1)/www/cgi-bin/webif/*.wip 
    173         if [ "$(OPENWRTVERSION)" != "7.06 (Kamikaze)" ]; then \ 
    174                 rm -f $(1)/usr/lib/webif/fixed-functions.sh; \ 
    175         fi 
    176173        ./embed_rev.sh $(1)/www/.version \ 
    177174                        $(1)/usr/lib/webif/webif.sh \ 
  • firmware/trunk/kamikaze/package/webif/files/bin/klogd

    r354 r386  
    11#!/bin/sh 
    22#“No one can go on being a rebel too long without turning into an autocrat.” 
    3 if [ -n "$(ps | grep [k]logd | grep -v "/bin/sh")" ]; then 
     3if [ -n "$(ps | grep [k]logd)" ]; then 
    44        echo "klogd has already been started." 
    55else 
  • firmware/trunk/kamikaze/package/webif/files/bin/syslogd

    r354 r386  
    11#!/bin/sh 
    22#“No one can go on being a rebel too long without turning into an autocrat.” 
    3 if [ -n "$(ps | grep [s]yslogd | grep -v "/bin/sh")" ]; then 
     3if [ -n "$(ps | grep [s]yslogd)" ]; then 
    44        echo "syslogd has already been started." 
    55else 
  • firmware/trunk/kamikaze/package/webif/files/etc/config/webif

    r354 r386  
    1515config webif misc 
    1616        option opendns "0" 
    17  
     17         
     18config webif ssl 
     19        option enable '0' 
     20         
    1821config webif wireless 
    19         option wifi0_txpower '
     22        option wifi0_txpower '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
  • firmware/trunk/kamikaze/package/webif/files/etc/init.d/syslog

    r354 r386  
    3131                [ "$IPCALC_CMD" == "" ] && IPCALC_CMD=$(which ipcalc 2>/dev/null) 
    3232                [ "$IPCALC_CMD" != "" ] && { 
    33                         eval $($IPCALC_CMD "$ipaddr") 
     33                        $IPCALC_CMD "$ipaddr" 
    3434                        [ "$ipaddr" != "$IP" ] && ipaddr="" 
    3535                } 
  • firmware/trunk/kamikaze/package/webif/files/etc/init.d/webif

    r354 r386  
    2929 
    3030start() { 
     31. /etc/functions.sh 
    3132. /lib/config/uci.sh 
    3233. /usr/lib/webif/functions.sh 
     
    3738         
    3839        [ -z "$device_name" ] && [ -f "/proc/diag/model" ] && device_name=$(cat "/proc/diag/model") 
    39         while [ -z "$device_name" ]; do 
    40                 uname -a |grep -q "mips" 
     40        while [ -z "$device_name" ]; do   
     41                dd bs=1024 skip=212 count=16 if=/dev/mtd/0 2>/dev/null | strings | grep -q W54G 
     42                [ $? = "0" ] && { 
     43                       device_name="Linksys WRT54G" 
     44                       break 
     45                } 
     46                dd bs=1024 count=1 skip=5 if=/dev/mtd/0 2>/dev/null | strings | grep "WL500gp" 
     47                [ $? = "0" ] && { 
     48                       device_name="ASUS WL-500gp" 
     49                       break 
     50                } 
     51                ifconfig eth0 |grep -q 00:0D:B9:**:**:** 
    4152                [ $? = "0" ] && { 
    42                         dd bs=1 count=19 skip=5 if=/dev/mtd/5 2>/dev/null | strings | grep "MR3201A-FLF-FON" || ifconfig eth0 |grep -q 00:18:84:**:**:** 
    43                         [ $? = "0" ] && { 
    44                                 device_name="La Fonera (ACCTON MR3201A)" 
    45                                 break 
    46                         } 
    47                         ifconfig eth0 |grep -q 00:18:0A:**:**:** 
    48                         [ $? = "0" ] && { 
    49                                 device_name="Meraki Mini" 
    50                                 break 
    51                         } 
    52                         cat /proc/cpuinfo |grep -q "WP54" 
    53                         [ $? = "0" ] && { 
    54                                 device_name="Compex WP54" 
    55                                 break 
    56                         } 
     53                        device_name="PC Engines WRAP" 
     54                        break 
     55                } 
     56                dd bs=1 count=19 skip=5 if=/dev/mtd/5 2>/dev/null | strings | grep "MR3201A-FLF-FON" || ifconfig eth0 |grep -q 00:18:84:**:**:** 
     57                [ $? = "0" ] && { 
     58                        device_name="La Fonera (ACCTON MR3201A)" 
     59                        break 
    5760                } 
    58  
    59                 if [ "$(uname -m)" = "i?86" ]; then 
    60                         ifconfig eth0 |grep -q 00:0D:B9:**:**:** 
    61                         [ $? = "0" ] && { 
    62                                 device_name="PC Engines WRAP" 
    63                                 break 
    64                         } 
    65                 fi 
    66  
    67                 cat /proc/cpuinfo |grep -q "IXP4\?\?" 
     61                cat /proc/cpuinfo |grep "Gateway 7001 AP" 
    6862                [ $? = "0" ] && { 
    69                         cat /proc/cpuinfo |grep "Gateway 7001 AP" 
    70                         [ $? = "0" ] && { 
    71                                 device_name="Gateway 7001 AP" 
    72                                 break 
    73                         } 
    74                         cat /proc/cpuinfo |grep "D-Link DSM-G600 RevA" 
    75                         [ $? = "0" ] && { 
    76                                 device_name="D-Link DSM-G600 RevA" 
    77                                 break 
    78                         } 
    79                         cat /proc/cpuinfo |grep "Freecom FSG-3" 
    80                         [ $? = "0" ] && { 
    81                                 device_name="Freecom FSG-3" 
    82                                 break 
    83                         } 
    84                         cat /proc/cpuinfo |grep "Iomega NAS 100d" 
    85                         [ $? = "0" ] && { 
    86                                 device_name="Iomega NAS 100d" 
    87                                 break 
    88                         } 
    89                         cat /proc/cpuinfo |grep "Linksys NSLU2" 
    90                         [ $? = "0" ] && { 
    91                                 device_name="Linksys NSLU2" 
    92                                 break 
    93                         } 
     63                        device_name="Gateway 7001 AP" 
     64                        break 
    9465                } 
    95                 break 
     66         
     67                #Generic detection in case the router is not caught by the above rules. 
     68                if [ "$(uname -m)" = "i?86" ]; then 
     69                        device_name="Generic x86" 
     70                        break 
     71                fi 
     72                cat /proc/cpuinfo |grep "IXP4\?\?" 
     73                [ $? = "0" ] && { 
     74                        device_name="Unknown IXP4xx Device" 
     75                        break 
     76                } 
     77        break 
    9678        done 
    97         if [ -z "$CONFIG_general_firmware_version" -o -z "$CONFIG_general_firmware_name" ]; then 
     79        if [ -z "$CONFIG_general_firmware_version" -a -z "$CONFIG_general_firmware_name" ]; then 
    9880                #detect firmware info 
    9981                firmware_name=$CONFIG_general_firmware_name 
     
    10486                        firmware_name="OpenWrt Kamikaze" 
    10587                else     
    106                         firmware_name="Unknown Wrt" 
     88                        firmware_name="OpenWrt White Russian"           
    10789                fi       
    10890                firmware_subtitle="With X-Wrt Extensions" 
     
    11092                if [ -f "/etc/openwrt_version" ]; then 
    11193                        firmware_version=$(cat "/etc/openwrt_version") 
     94                elif grep -q "RC5" "/etc/banner"; then 
     95                        firmware_version="RC5"   
     96                elif grep -q "RC6" "/etc/banner"; then 
     97                        firmware_version="RC6" 
    11298                elif grep -q "KAMIKAZE" "/etc/banner"; then 
    113                         firmware_version=$(cat /etc/banner |grep KAMIKAZE |cut -d '(' -f 2 |cut -d ')' -f 1) 
     99                        firmware_version=$(cat /etc/banner |grep KAMIKAZE |cut -d ' ' -f 5 |cut -d ')' -f 1) 
    114100                else 
    115101                        firmware_version="unknown" 
     
    136122        } 
    137123 
     124        # Start stunnel if ssl is enabled 
     125        if [ "$CONFIG_ssl_enable" = "1" ]; then 
     126                killall matrixtunnel 
     127                matrixtunnel -A /etc/ssl/matrixtunnel.cert  -p /etc/ssl/matrixtunnel.key -d 443 -r 80 
     128        else 
     129                killall matrixtunnel 
     130        fi 
     131 
     132        #get txpower for each wireless card and store it becuase madwifi doesn't allow you to get valid txpower  
     133        #settings without a ath interface being created 
     134        is_package_installed "kmod-madwifi" 
     135        if [ "$?" = "0" ]; then 
     136                for wifi in `ifconfig |grep "wifi" |cut -d' ' -f 1`; do 
     137                        athname=$(wlanconfig ath create wlandev $wifi wlanmode ap) 
     138                        for power in `iwlist ath0 txpower 2>&-|grep "Current Tx-Power" -v |grep "ath0" -v | cut -d'd' -f 1 |cut -d' ' -f 3`; do 
     139                                txpower="$txpower $power" 
     140                        done 
     141                        wlanconfig "$athname" destroy 
     142                        eval FORM_power="\$CONFIG_wireless_${wifi}_txpower" 
     143                        if [ "$FORM_power" != "$txpower" ]; then 
     144                                uci_set "webif" "wireless" "${wifi}_txpower" "$txpower" 
     145                        fi 
     146                done 
     147        fi 
     148         
    138149        if [ -e "/tmp/.uci/webif" ]; then 
    139150                uci_commit "webif" 
  • firmware/trunk/kamikaze/package/webif/files/etc/languages.lst

    r354 r386  
    99option|hr|Croatian 
    1010option|hu|Hungarian 
    11 option|it|Italian 
     11option|it|wItalian 
    1212option|nl|Dutch 
    1313option|no|Norwegian 
  • firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/apn.csv

    r354 r386  
    2929is:OG Vodafone:gprs.is:: 
    3030lu:LUXGSM:web.pt.lu:: 
    31 it:3 Italy:naviga.tre.it:: 
  • firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/apply.sh

    r354 r386  
    1919                        timezone_cfg="$CONFIG_SECTION" 
    2020                ;; 
    21                 ntp_client) 
    22                         config_get hostname     $CONFIG_SECTION hostname 
    23                         config_get port         $CONFIG_SECTION port 
    24                         config_get count        $CONFIG_SECTION count 
    25          
    26                         [ "$DONE" = "1" ] && exit 0 
    27                         ps x | grep 'bin/[n]tpclient' >&- || { 
    28                                 route -n 2>&- | grep '^0.0.0.0' >&- && { 
    29                                         /usr/sbin/ntpclient -c ${count:-1} -s -h $hostname -p ${port:-123} 2>&- >&- && DONE=1 
    30                                 } 
    31                         } 
    32                 ;; 
    33                 system) 
    34                         config_get hostname $CONFIG_SECTION hostname 
    35                         echo "${hostname:-OpenWrt}" > /proc/sys/kernel/hostname 
    36                 ;; 
    3721        esac 
    3822} 
     
    4125        hosts) rm -f /etc/hosts; mv $config /etc/hosts; killall -HUP dnsmasq ;; 
    4226        ethers) rm -f /etc/ethers; mv $config /etc/ethers; killall -HUP dnsmasq ;; 
    43         firewall) mv /tmp/.webif/file-firewall /etc/config/firewall && /etc/init.d/firewall restart && reload_upnpd;; 
     27        firewall) mv /tmp/.webif/file-firewall /etc/config/firewall && /etc/init.d/firewall restart;; 
    4428        dnsmasq.conf) mv /tmp/.webif/file-dnsmasq.conf /etc/dnsmasq.conf && /etc/init.d/dnsmasq restart;; 
    4529' 
     
    116100} 
    117101 
    118 reload_upnpd() { 
    119         config_load upnpd 
    120         config_get_bool test config enabled 0 
    121         if [ 1 -eq "$test" ]; then 
    122                 echo '@TR<<Starting>> @TR<<upnpd>> ...' 
    123                 [ -f /etc/init.d/miniupnpd ] && { 
    124                         /etc/init.d/miniupnpd enable >&- 2>&- <&- 
    125                         /etc/init.d/miniupnpd start >&- 2>&- <&- 
    126                 } 
    127                 [ -f /etc/init.d/upnpd ] && { 
    128                         /etc/init.d/upnpd enable >&- 2>&- <&- 
    129                         /etc/init.d/upnpd restart >&- 2>&- <&- 
    130                 } 
    131         else 
    132                 echo '@TR<<Stopping>> @TR<<upnpd>> ...' 
    133                 [ -f /etc/init.d/miniupnpd ] && { 
    134                         /etc/init.d/miniupnpd stop >&- 2>&- <&- 
    135                         /etc/init.d/miniupnpd disable >&- 2>&- <&- 
    136                 } 
    137                 [ -f /etc/init.d/upnpd ] && { 
    138                         /etc/init.d/upnpd stop >&- 2>&- <&- 
    139                         /etc/init.d/upnpd disable >&- 2>&- <&- 
    140                 } 
    141         fi 
    142         config_clear config 
    143 } 
    144  
    145102# switch_language (old_lang)  - switches language if changed 
    146103switch_language() { 
     
    186143        unset CONFIG_orig_SECTION 
    187144} 
    188  
    189 # config-*              simple config files 
    190 ( 
    191         cd /proc/self 
    192         cat /tmp/.webif/config-* 2>&- | grep '=' >&- 2>&- && { 
    193                 exists "/usr/sbin/nvram" && { 
    194                         cat /tmp/.webif/config-* 2>&- | tee fd/1 | xargs -n1 nvram set   
    195                         echo "@TR<<Committing>> NVRAM ..." 
    196                         nvram commit 
    197                 } 
    198         } 
    199 ) 
    200145 
    201146# 
     
    223168                        ;; 
    224169                "/tmp/.uci/upnpd") 
    225                         reload_upnpd 
     170                        config_load upnpd 
     171                        config_get_bool test config enabled 0 
     172                        if [ 1 -eq "$test" ]; then 
     173                                echo '@TR<<Starting>> @TR<<upnpd>> ...' 
     174                                [ -f /etc/init.d/miniupnpd ] && { 
     175                                        /etc/init.d/miniupnpd enable >&- 2>&- <&- 
     176                                        /etc/init.d/miniupnpd start >&- 2>&- <&- 
     177                                } 
     178                                [ -f /etc/init.d/upnpd ] && { 
     179                                        /etc/init.d/upnpd enable >&- 2>&- <&- 
     180                                        /etc/init.d/upnpd restart >&- 2>&- <&- 
     181                                } 
     182                        else 
     183                                echo '@TR<<Stopping>> @TR<<upnpd>> ...' 
     184                                [ -f /etc/init.d/miniupnpd ] && { 
     185                                        /etc/init.d/miniupnpd stop >&- 2>&- <&- 
     186                                        /etc/init.d/miniupnpd disable >&- 2>&- <&- 
     187                                } 
     188                                [ -f /etc/init.d/upnpd ] && { 
     189                                        /etc/init.d/upnpd stop >&- 2>&- <&- 
     190                                        /etc/init.d/upnpd disable >&- 2>&- <&- 
     191                                } 
     192                        fi 
     193                        config_clear config 
    226194                        ;; 
    227195                "/tmp/.uci/network") 
     
    232200                                /etc/init.d/dnsmasq start 
    233201                        fi 
    234                         ;; 
    235                 "/tmp/.uci/ntp_client") 
    236                         killall ntpclient 
    237                         config_load ntp_client& 
    238202                        ;; 
    239203                "/tmp/.uci/dhcp") 
     
    252216                        /etc/init.d/openvpn start ;; 
    253217                "/tmp/.uci/system") 
    254                         config_load system ;; 
     218                        /etc/init.d/boot start ;; 
    255219                "/tmp/.uci/snmp") 
    256220                        echo '@TR<<Exporting>> @TR<<snmp settings>> ...' 
     
    265229                        /etc/init.d/S??snmpd restart >&- 2>&- 
    266230                        ;; 
    267                 "/tmp/.uci/l2tpns") 
    268                         echo '@TR<<Exporting>> @TR<<l2tpns server settings>> ...' 
    269                         [ -e "/usr/lib/webif/l2tpns_apply.sh" ] && { 
    270                                 /usr/lib/webif/l2tpns_apply.sh >&- 2>&- 
    271                         } 
    272  
    273                         echo '@TR<<Reloading>> @TR<<l2tpns server>> ...' 
    274                         /etc/init.d/l2tpns restart >&- 2>&- 
    275                         ;; 
    276231                "/tmp/.uci/updatedd") 
    277232                        uci_load "updatedd" 
     
    287242                "/tmp/.uci/timezone") 
    288243                        echo '@TR<<Exporting>> @TR<<TZ setting>> ...' 
    289                         [ ! -f /etc/rc.d/S??timezone ] && /etc/init.d/timezone enable >&- 2>&- <&- 
    290                         /etc/init.d/timezone restart 
    291                         ;; 
    292                 "/tmp/.uci/webifssl") 
    293                         config_load webifssl 
    294                         config_get_bool test matrixtunnel enable 0 
    295                         if [ 1 -eq "$test" ]; then 
    296                                 [ -f /etc/init.d/webifssl ] && { 
    297                                         #echo '@TR<<Starting>> @TR<<webif^2 ssl tunnel>> ...' 
    298                                         /etc/init.d/webifssl enable >&- 2>&- <&- 
    299                                         /etc/init.d/webifssl start 
    300                                 } 
    301                         else 
    302                                 [ -f /etc/init.d/webifssl ] && { 
    303                                         #echo '@TR<<Stopping>> @TR<<webif^2 ssl tunnel>> ...' 
    304                                         /etc/init.d/webifssl stop 
    305                                         /etc/init.d/webifssl disable >&- 2>&- <&- 
    306                                 } 
    307                         fi 
     244                        uci_load "timezone" 
     245                        eval CONFIG_timezone_posixtz="\$CONFIG_${timezone_cfg}_posixtz" 
     246                        # create symlink to /tmp/TZ if /etc/TZ doesn't exist 
     247                        # todo: -e | -f | -d didn't seem to work here, so I used find 
     248                        if [ -z $(find "/etc/TZ" 2>/dev/null) ]; then 
     249                                ln -s /tmp/TZ /etc/TZ 
     250                        fi 
     251                        # eJunky: set timezone 
     252                        [ "$CONFIG_timezone_posixtz" ] && echo $CONFIG_timezone_posixtz > /etc/TZ 
    308253                        ;; 
    309254        esac 
  • firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/common.awk

    r354 r386  
    22function config_load(package, var) { 
    33        while (("/bin/ash -c '. /etc/functions.sh; unset NO_EXPORT; config_load \""package"\"; env | grep \"^CONFIG_\"'" | getline) == 1) { 
    4                 sub("^CONFIG_", "") 
    5                 if (match($0, "=") == 0) { 
    6                         if (var != "") CONFIG[var] = CONFIG[var] "\n" $0 
    7                         next 
    8                 } 
    9                 var=substr($0, 1, RSTART-1) 
    10                 CONFIG[var] = substr($0, RSTART+1, length($0) - RSTART) 
    11         } 
    12 } 
    13  
    14 # parameters: 1 
    15 function config_load_state(package, var) { 
    16         while (("/bin/ash -c '. /etc/functions.sh; unset NO_EXPORT; . \"/var/state/"package"\" 2>/dev/null; env | grep \"^CONFIG_\"'" | getline) == 1) { 
    174                sub("^CONFIG_", "") 
    185                if (match($0, "=") == 0) { 
     
    228215        print "<h3><strong>@TR<<Subcategories>>:</strong></h3>" 
    229216        print "<ul>" 
    230         while (("grep -H '^##WEBIF:name:"CATEGORY":' "cgidir"/*.awx "cgidir"/*.sh 2>/dev/null | sed -e 's,^.*/\\([a-zA-Z0-9\\.\\-]*\\):\\(.*\\)$,\\2:\\1,' | sort -n" | getline) == 1) { 
     217        while (("grep -H '^##WEBIF:name:"CATEGORY":' "cgidir"/*.awx "cgidir"/*.sh 2>/dev/null | sed -e 's,^.*/\\([a-zA-Z\\.\\-]*\\):\\(.*\\)$,\\2:\\1,' | sort -n" | getline) == 1) { 
    231218                print_subcategory() 
    232219        } 
     
    276263                counter++ 
    277264        } 
    278         while (("/bin/ash -c 'for config in \$(ls /tmp/.uci/* 2>&- | grep -v \"\\.lock\$\"); do cat \"\$config\" 2>&-; done'" | getline) == 1) { 
     265        while (("cat /tmp/.uci/* 2>&-" | getline) == 1) { 
    279266                counter++ 
    280267        } 
  • firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/lang/cs/common.txt

    r354 r386  
    44 
    55## SVN version referenced 
    6 lang_for_svn => 3572 
     6lang_for_svn => 3299 
     7 
    78## /usr/lib/webif/apn.csv 
    89Vodafone UK => Vodafone VB 
     
    5253Error installing language pack => Chyba při instalaci jazykového balíčku 
    5354Committing => Ukládám 
    54 Starting => Startuji 
    55 upnpd => upnpd 
    56 Stopping => Zastavuji 
    5755Reloading => Obnovuji 
    5856network => síťová nastavení 
     
    6058syslogd => syslogd 
    6159OpenVPN => OpenVPN 
    62 Exporting => Exportuji 
    63 snmp settings => nastavení snmp 
    64 TZ setting => nastavení TZ 
    6560 
    6661## /usr/lib/webif/browser.awk 
     
    105100 
    106101## /usr/lib/webif/editor.awk 
    107 editor_File => Soubor 
     102File => Soubor 
    108103&nbsp;Save Changes&nbsp; => &nbsp;UloÅŸit změny&nbsp; 
    109104&nbsp;Back&nbsp; => &nbsp;Zpět&nbsp; 
     
    136131Invalid dots => Neplatné tečky 
    137132Invalid spaces => Neplatné mezery 
    138 Missing netmask => Chybějící síťová maska 
    139 Netmask not allowed => Síťová maska není přípustná 
    140133Error in => Chyba v poloÅŸce 
    141134 
     
    149142Settings saved => Nastavení byla uloÅŸena 
    150143Settings not saved => Nastavení nebyla uloÅŸena 
    151 Password_mismatch => Zadaná hesla nejsou stejná! 
    152144Warning => Varování 
    153 Password_warning => Nenastavili jste heslo pro webové rozhraní a přístup přes SSH.<br />Prosím zadejte jej nyní (uÅŸivatelské jméno pro váš prohlíşeč bude 'root'). 
     145Password_warning => Nenastavili jste heslo pro webové rozhraní a přístup přes SSH<br />Prosím zadejte jej nyní (uÅŸivatelské jméno pro váš prohlíşeč bude 'root'). 
    154146New Password => Nové heslo 
    155147Confirm Password => Potvrdit heslo 
    156148Set => Nastavit 
     149 
     150## /www/cgi-bin/webif/applications.sh 
     151Applications => Aplikace 
     152Applications => Aplikace 
     153List => Seznam 
     154List of Applications => Seznam aplikací 
     155## TODO 
    157156 
    158157## /www/cgi-bin/webif/.categories 
     
    164163Network => Síť 
    165164VPN => VPN 
     165Applications => Aplikace 
    166166Logout => Odhlášení 
    167167 
     
    184184## temporarily removed #### duplicate ##graphs_svg_required => Tento objekt vyÅŸaduje podporu SVG. 
    185185 
     186## /www/cgi-bin/webif/iframe.mini-info.sh 
     187Device Status => Stav zařízení 
     188## rest is untranslated 
     189 
    186190## /www/cgi-bin/webif/info.awx 
    187 Please wait => Počkejte prosím 
     191Info => Info 
    188192info_wait_install => Počkejte prosím, instalace můşe chvilku trvat 
    189193System Information => Systémové informace 
    190194About => O aplikaci 
    191 Info => Info 
    192 System => Systém 
    193195 
    194196## /www/cgi-bin/webif/log-browse.sh 
     
    210212Dest. Port => Cíl. port 
    211213 
    212 ## /www/cgi-bin/webif/log-dmesg.awx 
    213 log_dmesg_Kernel_Ring_Buffer => KruhovÜ záznam jádra 
    214 log_dmesg_no_current_messages => Ŝádné záznamy jádra nebyly nalezeny. 
    215 log_dmesg_no_archived_messages => Neexistují şádné archivované záznamy jádra. 
    216 log_dmesg_no_archive_exists => Archiv záznamů jádra neexistuje. 
     214## /www/cgi-bin/webif/log-dmesg.sh 
    217215Log => Záznam 
    218216Kernel => Jádro 
     217log_dmesg_Kernel_Ring_Buffer => KruhovÜ záznam jádra 
     218HelpText Browser_Frames => Váš prohlíşeč nepodporuje rámce,<br />pokračujte tímto odkazem 
     219log_dmesg_View_Kernel_Ring_Buffer=> Zobrazit kruhovÜ záznam jádra 
    219220 
    220221## /www/cgi-bin/webif/logout.sh 
     
    224225logout_reference => Odkaz k nahlédnutí, viz http://httpd.apache.org/docs/1.3/howto/auth.html 
    225226 
    226 ## /www/cgi-bin/webif/log-read.awx 
    227 Syslog View => Zobrazení záznamu syslog 
    228 log_read_no_messages => Neexistují şádné záznamy syslogu. 
     227## /www/cgi-bin/webif/log-read_frame.sh 
     228Syslog Messages => Zprávy syslogu 
     229 
     230## /www/cgi-bin/webif/log-read.sh 
    229231Log => Záznam 
    230232Syslog => Syslog 
    231  
    232 ## /www/cgi-bin/webif/log-setup.awx 
     233Syslog View => Zobrazení záznamu syslog 
     234Message Prefix => Předpona zpráv       
     235HelpText Browser_Frames => Váš prohlíşeč nepodporuje rámce,<br />pokračujte tímto odkazem 
     236View Syslog => Zobrazit syslog 
     237 
     238## /www/cgi-bin/webif/log-setup.sh 
    233239Remote host => VzdálenÜ počítač 
    234240Remote Port => VzdálenÜ port 
    235241Minutes Between Marks => Minut mezi značkami 
    236242Log Size => Velikost záznamu 
    237 ##duplicate Settings saved 
    238 ##duplicate Settings not saved 
    239 syslog Settings => Nastavení pro syslog 
    240243Log => Záznam 
    241244Syslog Settings => Nastavení pro syslogd 
     245syslog Settings => Nastavení pro syslog 
     246Remote Syslog => VzdálenÜ syslog 
     247Server IP Address => Adresa IP serveru 
     248##!! $variable trouble 
     249##HelpText Remote Syslog => Adresa IP a port vzdáleného logovacího počítače. Nechcete-li pouşít vzdálené logování, ponechte poloÅŸku prázdnou. Port je ve vÜchozím stavu nastaven na $DEFAULT_log_port 
     250HelpText Remote Syslog => Adresa IP a port vzdáleného logovacího počítače. Nechcete-li pouşít vzdálené logování, ponechte poloÅŸku prázdnou. 
     251Server Port => Port serveru 
     252Syslog Marks => Značky v syslogu 
     253Minutes Between Marks => Minut mezi značkami 
     254##!! $variable trouble 
     255##HelpText Syslog Marks => Pravidelné značky ve vaÅ¡em záznamu. Tento parametr nastavuje čas v minutách mezi značkami. Hodnota 0 znamená bez značek. VÜchozí hodnota: $DEFAULT_log_mark. 
     256HelpText Syslog Marks => Pravidelné značky ve vaÅ¡em záznamu. Tento parametr nastavuje čas v minutách mezi značkami. Hodnota 0 znamená bez značek. 
     257Local Log => Místní záznam 
     258Log type => Typ záznamu 
     259Circular => KruhovÜ 
     260File => Soubor 
     261##!! $variable trouble 
     262##HelpText Log Type => Zda bude váš záznam uloÅŸen ve vyhrazené kruhové oblasti v paměti nebo v souboru. Dejte pozor na to, ÅŸe soubory jsou uloÅŸeny paměťovém souborovém systému, kterÜ se ztratí, pokud restartujete router. VÜchozí hodnota: $DEFAULT_log_type. 
     263HelpText Log Type => Zda bude váš záznam uloÅŸen ve vyhrazené kruhové oblasti v paměti nebo v souboru. Dejte pozor na to, ÅŸe soubory jsou uloÅŸeny paměťovém souborovém systému, kterÜ se ztratí, pokud restartujete router. 
     264Log File => Soubor záznamu 
     265##!! $variable trouble 
     266##HelpText Log File => Cesta a název vaÅ¡eho souboru záznamu. Můşe bÜt nastavena do jakéhokoli zapisovatelného souborového systému. UPOZORNĚNÍ: NEPOUŜÍVEJTE souborovÜ systém JFFS, protoÅŸe na něj syslog HODNĚ zapisuje. Můşete pouşít /tmp nebo jakÜkoli souborovÜ systém na externí ukládací jednotce. VÜchozí hodnota: $DEFAULT_log_file. 
     267HelpText Log File => Cesta a název vaÅ¡eho souboru záznamu. Můşe bÜt nastavena do jakéhokoli zapisovatelného souborového systému. UPOZORNĚNÍ: NEPOUŜÍVEJTE souborovÜ systém JFFS, protoÅŸe na něj syslog HODNĚ zapisuje. Můşete pouşít /tmp nebo jakÜkoli souborovÜ systém na externí ukládací jednotce. 
     268Log Size => Velikost záznamu 
     269##!! $variable trouble 
     270##HelpText Log Size => Velikost vaÅ¡eho záznamu v kilobajtech. Buďte opatrní při stanovení velikosti kruhové paměti, protoÅŸe je o ni zmenÅ¡ena pracovní paměť. VÜchozí hodnota: $DEFAULT_log_size kB. 
     271HelpText Log Size => Velikost vaÅ¡eho záznamu v kilobajtech. Buďte opatrní při stanovení velikosti kruhové paměti, protoÅŸe je o ni zmenÅ¡ena pracovní paměť. 
    242272 
    243273## /www/cgi-bin/webif/network-firewall.sh 
     
    439469qos_adv_disabled => Zakázáno 
    440470Advanced => Pokročilé moÅŸnosti 
    441 HelpText Advanced => Normálně uÅŸivatelům stačí pouşít formulář níşe ke konfiguraci QoS. Někteří lidé mohou potřebovat přístup k mnohem pokročilejším nastavením. Alternativně můşete <a href="./system-editor.sh?path=/etc/config&amp;edit=qos">ručně upravit konfiguraci</a>. 
     471HelpText Advanced => Normálně uÅŸivatelům stačí pouşít formulář níşe ke konfiguraci QoS. Někteří lidé mohou potřebovat přístup k mnohem pokročilejším nastavením. Alternativně můşete <a href="./system-editor.sh?path=/etc/config&amp;edit=qos">ručně upravit konfiguraci</a 
    442472QoS Traffic Classification Rules => Klasifikační pravidla provozu QoS 
    443473Group => Skupina 
     
    559589wol_help => Zde můşete odeslat paket Wake-On-LAN pro automatické nastartování počítače, kterÜ je vypnutÜ. Počítač musí podporovat WOL a tato vlastnost musí bÜt zapnuta v BISOu, aby to pracovalo. NaneÅ¡těstí není definována jednoznačná odpověď probouzeného počítače, takÅŸe nebudete vědět, zda bylo probuzení úspěšné a stroj opravdu startuje. 
    560590 
    561 ## /www/cgi-bin/webif/status-basic.sh 
    562 Status => Stav 
    563 System => Systém 
    564 Device Status => Stav zařízení 
    565 Swap => Odkládací 
    566 KiB => KiB 
    567 Used => VyuÅŸito 
    568 mount_of => z 
    569 status_basic_swap_partition => odkládací oblast 
    570 status_basic_swap_file => odkládací soubor 
    571 #Load Average => Průměrné zatíşení 
    572 #Load Average => Průměrné zatíşení 
    573 #Helptext Load Average => Průměrné zatíşení reprezentuje průměry aktivních procesů v průběhu posledních 1, 5 a 15 minut. 
    574 RAM Usage => VyuÅŸití RAM 
    575 Total => Celkem 
    576 Used => VyuÅŸito 
    577 Helptext RAM Usage => Aktuální vyuÅŸití RAM. Velikost 'free' reprezentuje, kolik RAM je dostupné pro aplikace. 
    578 Helptext Swap => KdyÅŸ program poÅŸaduje více paměti neÅŸ je fyzicky v počítači k dispozici, aktuálně nepouşívané informace mohou bÜt zapsány do dočasného prostoru na disku, kterÜ je nazÜván odkládací (swap), a tak paměť uvolnit. 
    579 Tracked Connections => Sledovaná spojení 
    580 Maximum => Maximum 
    581 Used => VyuÅŸito 
    582 Helptext Tracked Connections => Počet spojení v tabulce 'conntrack' vaÅ¡eho routeru. <a href="status-conntrackread.awx">Zobrazit tabulku 'conntrack'</a>. 
    583 Mount Usage => VyuÅŸití médií 
    584 Helptext Mount Usage => Velikost celkového a pouÅŸitého místa na souborovÜch systémech připojenÜch k routeru. 
    585  
    586591## /www/cgi-bin/webif/status-connection.sh 
    587592Status => Stav 
     
    591596Router Listening Ports => Router naslouchá na portech 
    592597Router Connections => Spojení na router 
    593  
    594 ## /www/cgi-bin/webif/status-conntrackread.awx 
    595 Conntrack Table => Tabulka conntrack 
    596 status_conntrackread_no_messages => Neexistují şádné záznamy sledování spojení. 
    597 Status => Stav 
    598 Conntrack => Conntrack 
    599598 
    600599## /www/cgi-bin/webif/status-diag.sh 
     
    606605TraceRoute => TraceRoute 
    607606Please wait for output of => Počkejte prosím na vÜstup z 
    608  
    609 ## /www/cgi-bin/webif/status-interfaces.sh 
    610 Status => Stav 
    611 Interfaces => Rozhraní 
    612 DNS Server => Server DNS 
    613 DNS Servers => Servery DNS 
    614 WAN => WAN 
    615 LAN => LAN 
    616 MAC Address => Adresa MAC 
    617 IP Address => Adresa IP 
    618 Received => Přijato 
    619 Transmitted => Odesláno 
    620 status_interfaces_pkts => paketů 
    621 WAN WAN => Termín WAN označuje síť velké geografické rozlohy a je obvykle připojením směrem na Internet. 
    622 LAN LAN => Termín LAN označuje síť lokální rozlohy. 
    623 LOOPBACK_helptext => Rozhraní lokální smyčky je typ 'IP adresa bez elektrického okruhu' nebo 'virtuální IP' adresa, protoÅŸe adresa není přiřazena k şádnému konkrétnímu rozhraní (nebo el. okruhu) na počítači nebo směrovači. JakÜkoli provoz, kterÜ poÅ¡le počítačovÜ program do sítě loopback je adresován stejnému počítači. 
    624 WLAN => WLAN 
    625 Access Point => PřístupovÜ bod 
    626 Mode => ReÅŸim 
    627 ESSID => ESSID 
    628 Frequency => Frekvence 
    629 GHz => GHz 
    630 Transmit Power => Vysílací vÜkon 
    631 Noise Level => Úroveň Å¡umu 
    632 Encryption Key => Å ifrovací klíč 
    633 Security mode => ReÅŸim zabezpečení 
    634 Rx Invalid nwid => 
    635 Rx Invalid Encryption => 
    636 Tx Retries in Excess => 
    637 Tx Invalid => 
    638 Tx Missed Beacon => 
    639 WLAN LAN => Termín WLAN označuje bezdrátovou síť lokální rozlohy. 
    640 Raw Information => Surové informace 
    641 &nbsp;Show raw statistics&nbsp; => &nbsp;Zobrazit surovou statistiku&nbsp; 
    642 Interfaces Status WAN => Stav rozhraní WAN 
    643 Interfaces Status LAN => Stav rozhraní LAN 
    644 Interfaces Status Other => Stav rozhraní 
    645 Interfaces Status WLAN nr => Stav bezdrátového rozhraní 
    646607 
    647608## /www/cgi-bin/webif/status-iptables.sh 
     
    806767system_editor_info_file_deleted => Soubor byl smazán úspěšně 
    807768 
    808 ## /www/cgi-bin/webif/system-password.sh 
    809 Password => Heslo 
    810 Passwords do not match => Hesla nejsou stejná 
    811 System => Systém 
    812 Password Change => Změna hesla 
    813 New Password => Nové heslo 
    814 Confirm Password => Potvrdit heslo 
    815  
    816769## /www/cgi-bin/webif/system-settings.sh 
    817770System => Systém 
     
    819772System Settings => Systémová nastavení 
    820773system_settings_Installing_NTPCLIENT_package => Instaluji balíček NTPCLIENT 
    821 system_settings_Updating_time => Aktualizuji čas 
    822774system_settings_Installing_MatrixTunnel_package => Instaluji balíček MatrixTunnel 
    823 system_settings_Generating_SSL_certificate => Generuji SSL certifikát 
    824 Host Name => Název počítače 
    825 Warning => Varování 
    826 system_settings_Hostname_failed_validation => Název počítače není platnÜ. Nelze uloÅŸit. 
    827775system_settings_Webif_SSL => Webif&sup2; přes SSL 
    828776system_settings_Feature_requires_matrixtunnel => Balíček MatrixTunnel není nainstalován. Je třeba jej nainstalovat pro podporu SSL 
     
    830778system_settings_webifssl_Off => Vypnuto 
    831779system_settings_webifssl_On => Zapnuto 
    832 system_settings_Feature_requires_certificate => SSL certifikát chybí. Je třeba jej vygenerovat pro podporu SSL 
    833 system_settings_Generate_SSL_Certificate => Generovat SSL certifikát 
     780Host Name => Název počítače 
     781Warning => Varování 
     782system_settings_Hostname_failed_validation => Název počítače není platnÜ. Nelze uloÅŸit. 
    834783Enable visual effects => Povolit vizuální efekty 
    835784Boot Wait => Boot Wait 
     
    839788Wait Time => Čas čekání 
    840789HelpText wait_time => Počet sekund čekání boot loaderu na TFTP přenos, je-li Boot Wait zapnut. 
    841 NTP Server => Server NTP 
    842 NTP Server Port => Port serveru NTP 
    843 NTP Count => Počet opakování 
    844 Remove NTP Server => Odebrat Server NTP 
    845 Add NTP Server => Přidat Server NTP 
     790CPU Clock Frequency => Frekvence hodin CPU 
     791Dangerous Settings => Nebezpečná nastavení 
     792HelpText CPU Clock Frequency => Tuto hodnotu neměňte. Váš router můşete znehodnotit, pokud nevíte, co děláte. Pokusili jsme se tuto moÅŸnost zablokovat pro vÅ¡echny routery, které mohou bÜt znehodnoceny prostřednictvím chybného nastavení frekvence hodin. Pouze přístroje Linksys WRT54G v4 jsou odolné proti Å¡patnému nastavení frekvence. 
    846793system_settings_feature_requires_ntpclient => Není nainstalován klient NTP. Pro správnÜ čas je třeba jednoho nainstalovat 
    847794system_settings_Install_NTP_Client => Nainstalovat klienta NTP 
     
    849796system_settings_group_unknown_TZ => Neznámá 
    850797system_settings_User_or_old_TZ => UÅŸivatelem definovaná (nebo zastaralá) 
     798System Settings => Systémová nastavení 
    851799Time Settings => Nastavení času 
    852800Timezone => Časová zóna 
     
    854802system_settings_js_required => Tato poloÅŸka vyÅŸaduje podporu JavaScriptu. 
    855803Timezone_helptext => Nastavte vaÅ¡i časovou zónu podle nejblişšího města vaÅ¡eho regionu z předdefinovaného seznamu. 
     804NTP Server => Server NTP 
    856805Webif&sup2; Settings => Nastavení pro Webif&sup2; 
    857806Language => Jazyk 
     
    909858info_upgrade_webif => Aktualizovat/Přeinstalovat Webif&sup2; 
    910859info_check_daily_text => Zahrnout denní sestavení při kontrole aktualizace pro webif&sup2; 
    911  
    912 ## /www/cgi-bin/webif/views/log-dmesg.ahtml 
    913 log_dmesg_Current_messages => Aktuální záznamy 
    914 log_filter_filtered => filtrováno 
    915 log_dmesg_Boot_time_messages => Záznamy po startu 
    916 log_filter_Text_Filter => TextovÜ filtr 
    917 log_filter_Text_to_Filter => FiltrovanÜ text 
    918 log_filter_Filter_Mode => ReÅŸim filtru 
    919 log_filter_Include => Zahrnout 
    920 log_filter_Exclude => Vyloučit 
    921 log_filter_Remove_Filter => Odstranit filtr 
    922 log_filter_Filter_Messages => Filtrovat záznamy 
    923 ##duplicate Short help 
    924 log_filter_Text_to_Filter_helptext => Zadejte text, kterÜ pokrÜvá to, co chcete nebo nechcete vidět. Ve skutečnosti můşete pouşít konstantní regulérní vÜrazy jako: <code>00:[[:digit:]]{2}:[[:digit:]]{2}</code> nebo <code>.debug&#124;.err</code>. 
    925 log_filter_Filter_Mode_helptext => V reÅŸimu Zahrnout uvidíte jen záznamy obsahující text, zatímco v reÅŸimu Vyloučit takové záznamy neuvidíte. 
    926  
    927 ## /www/cgi-bin/webif/views/log-read.ahtml 
    928 log_read_Syslog_Messages => Záznamy syslogu 
    929 # the rest is duplicated in log-dmesg.ahtml 
    930  
    931 ## /www/cgi-bin/webif/views/log-setup.ahtml 
    932 Remote Syslog => VzdálenÜ syslog 
    933 Server IP Address => Adresa IP serveru 
    934 Server Port => Port serveru 
    935 ##duplicate Short help 
    936 HelpText Remote Syslog => Adresa IP a port vzdáleného logovacího počítače. Nechcete-li pouşít vzdálené logování, ponechte poloÅŸku prázdnou. 
    937 Syslog Marks => Značky v syslogu 
    938 Minutes Between Marks => Minut mezi značkami 
    939 HelpText Syslog Marks => Pravidelné značky ve vaÅ¡em záznamu. Tento parametr nastavuje čas v minutách mezi značkami. Hodnota 0 znamená bez značek. 
    940 Local Log => Místní záznam 
    941 Log type => Typ záznamu 
    942 Circular => KruhovÜ 
    943 File => Soubor 
    944 Log File => Soubor záznamu 
    945 Log Size => Velikost záznamu 
    946 KiB => KiB 
    947 HelpText Log Type => Zda bude váš záznam uloÅŸen ve vyhrazené kruhové oblasti v paměti nebo v souboru. Dejte pozor na to, ÅŸe soubory jsou uloÅŸeny v souborovém systému v paměti, kterÜ se ztratí, pokud restartujete router. 
    948 HelpText Log File => Cesta a název vaÅ¡eho souboru záznamu. Můşe bÜt nastavena do jakéhokoli zapisovatelného souborového systému. UPOZORNĚNÍ: NEPOUŜÍVEJTE souborovÜ systém JFFS, protoÅŸe na něj syslog HODNĚ zapisuje. Můşete pouşít /tmp nebo jakÜkoli souborovÜ systém na externí ukládací jednotce. 
    949 HelpText Log Size => Velikost vaÅ¡eho záznamu v kibibajtech. Buďte opatrní při stanovení velikosti kruhové paměti, protoÅŸe je o ni zmenÅ¡ena pracovní paměť. 
    950  
    951 ## /www/cgi-bin/webif/views/status-conntrackread.ahtml 
    952 ##duplicate text filter texts 
    953 conntrackread_filter_Filter_Records => Filtrovat záznamy 
    954 ##duplicate Short help 
    955 Kernel Connection Tracking Table => Tabulka sledování spojení jádra 
    956860 
    957861## /www/svggraph/graph_cpu.svg 
  • firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/timezones.csv

    r354 r386  
    11#timezone group timezone cities timezone config string  zoneinfo 
    2 #revision: 2007f 
     2#lubek@users.berlios.de 20070321 - updated to 2007d, zoneinfo added:  
    33#  it is not exact for the "cities list" but it enables to remember  
    44#  the selection and to synchronize TZs with the standard zoneinfo 
  • firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/webif.sh

    r354 r386  
    136136 
    137137        empty "$REMOTE_USER" && neq "${SCRIPT_NAME#/cgi-bin/}" "webif.sh" && { 
    138                 ! empty "$FORM_passwd1$FORM_passwd2" && { 
    139                         equal "$FORM_passwd1" "$FORM_passwd2" && { 
    140                                 echo '<pre>' 
    141                                 ( 
    142                                         echo "$FORM_passwd1" 
    143                                         sleep 1 
    144                                         echo "$FORM_passwd2" 
    145                                 ) | passwd root 2>&1 && apply_passwd 
    146                                 echo '</pre>' 
    147                                 footer 
    148                                 exit 
    149                         } || { 
    150                                 echo "<h3 class=\"warning\">@TR<<Password_mismatch#The entered passwords do not match!>></h3>" 
    151                         } 
     138                empty "$FORM_passwd1" || { 
     139                        echo '<pre>' 
     140                        ( 
     141                                echo "$FORM_passwd1" 
     142                                sleep 1 
     143                                echo "$FORM_passwd2" 
     144                        ) | passwd root 2>&1 && apply_passwd 
     145                        echo '</pre>' 
     146                        footer 
     147                        exit 
    152148                } 
    153149                equal "$_nopasswd" 1 && { 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/.categories

    r354 r386  
    77##WEBIF:category:Network 
    88##WEBIF:category:VPN 
     9##WEBIF:category:Applications 
    910##WEBIF:category:- 
    1011##WEBIF:category:Logout 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/config.sh

    r354 r386  
    3333                        } 
    3434                done             
    35                 for configname in $(ls /tmp/.uci/* 2>&- | grep -v "\\.lock\$" 2>&-); do 
     35                for configname in $(ls /tmp/.uci/* 2>&-); do 
    3636                                echo -n "<h3>${configname#/tmp/.uci/}</h3><br /><pre>" 
    3737                                cat $configname 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/info.awx

    r354 r386  
    7878        if (machinfo ~ /mips/) { 
    7979                if (boardtype ~ /Atheros/) repo = "atheros-2.6" 
    80                 else if (boardtype ~ /WP54/) repo = "adm5120-2.6" 
    8180                else if (machinfo ~ /2\.4/) repo = "brcm-2.4" 
    8281                else if (machinfo ~ /2\.6/) repo = "brcm-2.6" 
     
    8786        } 
    8887        revision = config_get("general", "firmware_version") 
    89         if (revision !~ /r/) { 
     88        if (revision == "7.06") { 
    9089                version_url = "http://downloads.x-wrt.org/xwrt/kamikaze/" revision "/" repo; 
    9190        } else { 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-ddns.sh

    r354 r386  
    2323 
    2424#define supported services 
    25 services="changeip dyndns eurodyndns ovh noip ods hn regfish tzo zoneedit
     25services="changeip dyndns eurodyndns ovh noip ods hn regfish tzo
    2626 
    2727#generate fields for supported services 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-qos.sh

    r354 r386  
    253253option|0|@TR<<qos_adv_disabled#Disabled>> 
    254254helpitem|Advanced 
    255 helptext|HelpText Advanced#Normally users just use the form below to configure QoS. Some people may need access to the more advanced settings. Alternatively, you can <a href="./system-editor.sh?path=/etc/config&amp;edit=qos">manually edit the config</a>. 
     255helptext|HelpText Advanced#Normally users just use the form below to configure QoS. Some people may need access to the more advanced settings. Alternatively, you can <a href="./system-editor.sh?path=/etc/config&amp;edit=qos">manually edit the config</a> 
    256256end_form 
    257257EOF 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-wan-lan.sh

    r354 r386  
    7272         
    7373        # pppoa 
    74         FORM_pppoa_vpi="$CONFIG_wan_vpi" 
    75         FORM_pppoa_vci="$CONFIG_wan_vci" 
     74        FORM_pppoa_vpi="CONFIG_wan_vpi" 
     75        FORM_pppoa_vci="CONFIG_wan_vci" 
    7676         
    7777        # umts apn 
     
    188188text|pptp_server_ip|$FORM_pptp_server_ip" 
    189189} 
    190 [ -e "/lib/network/pppoe.sh" ] && { 
     190[ -x "/lib/network/pppoe.sh" ] && { 
    191191        PPPOE_OPTION="option|pppoe|@TR<<PPPoE>>" 
    192192} 
    193 [ -e "/lib/network/pppoa.sh" ] && { 
     193[ -x "/lib/network/pppoa.sh" ] && { 
    194194        PPPOA_OPTION="option|pppoa|@TR<<PPPoA>>" 
    195195} 
    196196 
    197 [ -e "/lib/network/3g.sh" ] && { 
     197[ -x /sbin/ifup.wwan ] && { 
    198198        WWAN_OPTION="option|wwan|@TR<<UMTS/GPRS>>" 
    199199        WWAN_COUNTRY_LIST=$( 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-wlan.sh

    r370 r386  
    2626validate_wireless() { 
    2727        case "$adhoc_count:$sta_count:$ap_count" in 
     28                1*) 
     29                        if [ "$sta_count" != "0" ]; then 
     30                                append validate_error "string|<h3>@TR<<Error: No other virtual adapters are allowed if one is in adhoc mode.>></h3><br />" 
     31                        elif [ "$ap_count" != "0" ]; then 
     32                                append validate_error "string|<h3>@TR<<Error: No other virtual adapters are allowed if one is in adhoc mode.>></h3><br />" 
     33                        fi 
     34                        ;; 
    2835                0:0:?) 
    2936                        if [ "$ap_count" -gt "4" ]; then 
     
    4350                                        append validate_error "string|<h3>@TR<<Error: Only 4 virtual adapters are allowed in ap mode.>></h3><br />" 
    4451                                fi       
     52                        fi 
     53                        ;; 
     54                *) 
     55                        if [ "$adhoc_count" -gt "1" ]; then 
     56                                append validate_error "string|<h3>@TR<<Error: Only 1 virtual adapter is allowed to be in adhoc mode.>></h3><br />" 
    4557                        fi 
    4658                        ;; 
     
    105117for iface in $NETWORK_DEVICES; do 
    106118        network_options="$network_options  
    107                         option|$iface|$iface
     119                        option|$iface|@TR<<$iface>>
    108120done 
    109121 
    110122##################################################################### 
    111 # install wpa packages if needed 
    112 
    113  
     123# generate nas package field 
     124
    114125if ! empty "$FORM_install_nas"; then 
    115126        echo "Installing NAS package ...<pre>" 
     
    117128        echo "</pre>" 
    118129fi 
    119 if ! empty "$FORM_install_hostapd_mini"; then 
    120         echo "Installing HostAPD mini package ...<pre>" 
    121         install_package "hostapd-mini" 
    122         echo "</pre>" 
    123 fi 
    124130if ! empty "$FORM_install_hostapd"; then 
    125         hostapd_mini_installed="0" 
    126         is_package_installed hostapd-mini 
    127         equal "$?" "0" && ipkg remove "hostapd-mini" 
    128131        echo "Installing HostAPD package ...<pre>" 
    129132        install_package "hostapd" 
     
    135138        echo "</pre>" 
    136139fi 
    137  
    138140nas_installed="0" 
    139141is_package_installed nas 
     
    143145is_package_installed hostapd 
    144146equal "$?" "0" && hostapd_installed="1" 
    145  
    146 hostapd_mini_installed="0" 
    147 is_package_installed hostapd-mini 
    148 equal "$?" "0" && hostapd_mini_installed="1" 
    149147 
    150148wpa_supplicant_installed="0" 
     
    163161                config_get FORM_maxassoc $device maxassoc 
    164162                config_get FORM_distance $device distance 
     163                config_get FORM_diversity $device diversity 
    165164                config_get FORM_txantenna $device txantenna 
    166165                config_get FORM_rxantenna $device rxantenna 
    167                 config_get_bool FORM_diversity $device diversity 
    168                 config_get_bool FORM_disabled $device disabled 
     166                config_get FORM_disabled $device disabled 
    169167        else 
    170168                config_get country $device country 
     
    180178                eval FORM_disabled="\$FORM_disabled_$device" 
    181179        fi 
    182  
    183        append forms "start_form|@TR<<Wireless Adapter>> $device @TR<< Configuration>>" "$N" 
    184        if [ "$iftype" = "broadcom" ]; then 
    185               append forms "helpitem|Broadcom Wireless Configuration" "$N" 
     180         
     181        append forms "start_form|@TR<<Wireless Adapter>> $device @TR<< Configuration>>" "$N" 
     182        if [ "$iftype" = "broadcom" ]; then 
     183              append forms "helpitem|Broadcom Wireless Configuration" "$N" 
    186184                append forms "helptext|Helptext Broadcom Wireless Configuration#The router can be configured to handle multiple virtual interfaces which can be set to different modes and encryptions. Limitations are 1x sta, 0-3x ap or 1-4x ap or 1x adhoc" "$N" 
    187185        elif [ "$iftype" = "atheros" ]; then 
    188               append forms "helpitem|Atheros Wireless Configuration" "$N" 
     186              append forms "helpitem|Atheros Wireless Configuration" "$N" 
    189187                append forms "helptext|Helptext Atheros Wireless Configuration#The router can be configured to handle multiple virtual interfaces which can be set to different modes and encryptions. Limitations are 1x sta, 0-4x ap or 1-4x ap or 1x adhoc" "$N" 
    190188        fi 
    191189         
    192         mode_disabled="field|@TR<<Radio>> 
    193                         radio|disabled_$device|$FORM_disabled|0|@TR<<On>> 
    194                         radio|disabled_$device|$FORM_disabled|1|@TR<<Off>>" 
    195         append forms "$mode_disabled" "$N" 
    196          
    197         # Initialize channels based on country code 
    198         # (--- hardly a switch here ---) 
    199         case "$country" in 
    200                 All|all|ALL)  
    201                         BGCHANNELS="1 2 3 4 5 6 7 8 9 10 11 12 13 14"; CHANNEL_MAX=14 
    202                         ACHANNELS="36 40 42 44 48 50 52 56 58 60 64 149 152 153 157 160 161 156";; 
    203                 *)  
    204                         BGCHANNELS="1 2 3 4 5 6 7 8 9 10 11"; CHANNEL_MAX=11 
    205                         ACHANNELS="36 40 42 44 48 50 52 56 58 60 64 149 152 153 157 160 161 156";; 
    206         esac 
    207          
    208         if [ "$iftype" = "atheros" ]; then 
     190        mode_disabled="field|@TR<<Radio>> 
     191                select|disabled_$device|$FORM_disabled 
     192                option|1|@TR<<Off>> 
     193                option|0|@TR<<On>>" 
     194        append forms "$mode_disabled" "$N" 
     195                 
     196        if [ "$iftype" = "atheros" ]; then 
    209197                mode_fields="field|@TR<<Mode>> 
    210198                        select|mode_ap_$device|$FORM_ap_mode" 
     
    225213                                option|11a|@TR<<802.11A>>" 
    226214                fi 
    227                 append forms "$mode_fields" "$N" 
    228  
    229                 BG_CHANNELS="field|@TR<<Channel>>|bgchannelform_$device|hidden 
    230                         select|bgchannel_$device|$FORM_channel 
    231                         option|0|@TR<<Auto>>" 
    232                 for ch in $BGCHANNELS; do 
    233                         BG_CHANNELS="$BG_CHANNELS 
    234                                 option|$ch" 
    235                 done 
    236  
    237                 A_CHANNELS="field|@TR<<Channel>>|achannelform_$device|hidden 
    238                         select|achannel_$device|$FORM_channel" 
    239                 for ch in $ACHANNELS; do 
    240                         A_CHANNELS="$A_CHANNELS 
    241                                 option|$ch" 
    242                 done 
    243                 append forms "$A_CHANNELS" "$N" 
    244         elif [ "$iftype" = "broadcom" ]; then 
    245                 BG_CHANNELS="field|@TR<<Channel>>|bgchannelform_$device 
    246                         select|bgchannel_$device|$FORM_channel 
    247                         option|0|@TR<<Auto>>" 
    248                 for ch in $BGCHANNELS; do 
    249                         BG_CHANNELS="$BG_CHANNELS 
    250                                 option|$ch" 
    251                 done 
    252         fi 
     215        append forms "$mode_fields" "$N" 
     216        fi 
     217         
     218        # Initialize channels based on country code 
     219        # (--- hardly a switch here ---) 
     220        case "$country" in 
     221                All|all|ALL)  
     222                            BGCHANNELS="1 2 3 4 5 6 7 8 9 10 11 12 13 14"; CHANNEL_MAX=14 
     223                            ACHANNELS="36 40 42 44 48 50 52 56 58 60 64 149 152 153 157 160 161 156";; 
     224                *)  
     225                   BGCHANNELS="1 2 3 4 5 6 7 8 9 10 11"; CHANNEL_MAX=11 
     226                   ACHANNELS="36 40 42 44 48 50 52 56 58 60 64 149 152 153 157 160 161 156";; 
     227        esac 
     228         
     229        BG_CHANNELS="field|@TR<<Channel>>|bgchannelform_$device|hidden 
     230                select|bgchannel_$device|$FORM_channel 
     231                option|0|@TR<<Auto>>" 
     232        for ch in $BGCHANNELS; do 
     233                BG_CHANNELS="$BG_CHANNELS 
     234                        option|$ch" 
     235        done 
     236         
     237        A_CHANNELS="field|@TR<<Channel>>|achannelform_$device|hidden 
     238                select|achannel_$device|$FORM_channel" 
     239        for ch in $ACHANNELS; do 
     240                A_CHANNELS="$A_CHANNELS 
     241                        option|$ch" 
     242        done 
    253243        append forms "$BG_CHANNELS" "$N" 
     244        append forms "$A_CHANNELS" "$N" 
    254245         
    255246        if [ "$iftype" = "atheros" ]; then 
    256                 mode_diversity="field|@TR<<Diversity>> 
    257                                 radio|diversity_$device|$FORM_diversity|1|@TR<<On>> 
    258                                 radio|diversity_$device|$FORM_diversity|0|@TR<<Off>>"            
    259                 append forms "$mode_diversity" "$N" 
    260                 append forms "helpitem|Diversity" "$N" 
     247                mode_diversity="field|@TR<<Diversity>> 
     248                        select|diversity_$device|$FORM_diversity 
     249                        option|1|@TR<<On>> 
     250                        option|0|@TR<<Off>>"             
     251                append forms "$mode_diversity" "$N" 
     252                append forms "helpitem|Diversity" "$N" 
    261253                append forms "helptext|Helptext Diversity#Used on systems with multiple antennas to help improve reception. Disable if you only have one antenna." "$N" 
    262254                append forms "helplink|http://madwifi.org/wiki/UserDocs/AntennaDiversity" "$N" 
    263255 
    264                 form_txant="field|@TR<<TX Antenna>> 
    265                         radio|txantenna_$device|$FORM_txantenna|0|@TR<<Auto>> 
    266                         radio|txantenna_$device|$FORM_txantenna|1|@TR<<Antenna 1>> 
    267                         radio|txantenna_$device|$FORM_txantenna|2|@TR<<Antenna 2>>" 
    268                 append forms "$form_txant" "$N" 
    269  
    270                 form_rxant="field|@TR<<RX Antenna>> 
    271                         radio|rxantenna_$device|$FORM_rxantenna|0|@TR<<Auto>> 
    272                         radio|rxantenna_$device|$FORM_rxantenna|1|@TR<<Antenna 1>> 
    273                         radio|rxantenna_$device|$FORM_rxantenna|2|@TR<<Antenna 2>>" 
    274                 append forms "$form_rxant" "$N" 
    275         fi 
    276  
    277  
     256                form_txant="field|@TR<<TX Antenna>> 
     257                        select|txantenna_$device|$FORM_txantenna 
     258                        option|0|@TR<<Auto>> 
     259                        option|1|@TR<<Antenna 1>> 
     260                        option|2|@TR<<Antenna 2>>" 
     261                append forms "$form_txant" "$N" 
     262 
     263                form_rxant="field|@TR<<RX Antenna>> 
     264                        select|rxantenna_$device|$FORM_rxantenna 
     265                        option|0|@TR<<Auto>> 
     266                        option|1|@TR<<Antenna 1>> 
     267                        option|2|@TR<<Antenna 2>>" 
     268                append forms "$form_rxant" "$N" 
     269        fi 
     270         
     271         
    278272        #Currently broadcom only. 
    279273        if [ "$iftype" = "broadcom" ]; then 
    280        maxassoc="field|@TR<<Max Associated Clients (Default 128)>> 
    281                text|maxassoc_${device}|$FORM_maxassoc" 
     274        maxassoc="field|@TR<<Max Associated Clients (Default 128)>> 
     275                text|maxassoc_${device}|$FORM_maxassoc" 
    282276        append forms "$maxassoc" "$N" 
    283277        fi 
    284  
    285        distance="field|@TR<<Wireless Distance (In Meters)>> 
    286                text|distance_${device}|$FORM_distance" 
     278         
     279        distance="field|@TR<<Wireless Distance (In Meters)>> 
     280                text|distance_${device}|$FORM_distance" 
    287281 
    288282        append forms "$distance" "$N" 
    289283        append forms "helpitem|Wireless Distance" "$N" 
    290        append forms "helptext|Helptext Wireless Distance#You must enter a number that is the distance of your longest link." "$N" 
     284        append forms "helptext|Helptext Wireless Distance#You must enter a number that is the distance of your longest link." "$N" 
    291285 
    292286        add_vcfg="string|<tr><td><a href=$SCRIPT_NAME?add_vcfg=$device&amp;add_vcfg_number=$vcfg_number>@TR<<Add Virtual Interface>></a>" 
    293        append forms "$add_vcfg" "$N" 
    294        append forms "end_form" "$N" 
     287        append forms "$add_vcfg" "$N" 
     288        append forms "end_form" "$N" 
    295289 
    296290        ##################################################################### 
    297291        # This is looped for every virtual wireless interface (wifi-iface) 
    298292        # 
    299         for vcfg in $vface; do 
    300                 config_get FORM_device $vcfg device 
    301                 if [ "$FORM_device" = "$device" ]; then 
    302                         if empty "$FORM_submit"; then 
    303                                 config_get FORM_network $vcfg network 
    304                                 config_get FORM_mode $vcfg mode 
    305                                 config_get FORM_ssid $vcfg ssid 
    306                                 config_get FORM_encryption $vcfg encryption 
    307                                 config_get FORM_key $vcfg key 
    308                                 case "$FORM_key" in 
    309                                         1|2|3|4) FORM_wep_key="$FORM_key" 
    310                                                 FORM_key="";; 
    311                                 esac 
    312                                 config_get FORM_key1 $vcfg key1 
    313                                 config_get FORM_key2 $vcfg key2 
    314                                 config_get FORM_key3 $vcfg key3 
    315                                 config_get FORM_key4 $vcfg key4 
    316                                 config_get FORM_server $vcfg server 
    317                                 config_get FORM_radius_port $vcfg port 
    318                                 config_get FORM_txpower $vcfg txpower 
    319                                 config_get FORM_frag $vcfg frag 
     293        for vcfg in $vface; do 
     294                config_get FORM_device $vcfg device 
     295                if [ "$FORM_device" = "$device" ]; then 
     296                        if empty "$FORM_submit"; then 
     297                                config_get FORM_network $vcfg network 
     298                                config_get FORM_mode $vcfg mode 
     299                                config_get FORM_ssid $vcfg ssid 
     300                                config_get FORM_encryption $vcfg encryption 
     301                                config_get FORM_key $vcfg key 
     302                                case "$FORM_key" in 
     303                                        1|2|3|4) FORM_wep_key="$FORM_key" 
     304                                                FORM_key="";; 
     305                                esac 
     306                                config_get FORM_key1 $vcfg key1 
     307                                config_get FORM_key2 $vcfg key2 
     308                                config_get FORM_key3 $vcfg key3 
     309                                config_get FORM_key4 $vcfg key4 
     310                                config_get FORM_server $vcfg server 
     311                                config_get FORM_radius_port $vcfg port 
     312                                config_get FORM_hidden $vcfg hidden 
     313                                config_get FORM_isolate $vcfg isolate 
     314                                config_get FORM_txpower $vcfg txpower 
     315                                config_get FORM_bgscan $vcfg bgscan 
     316                                config_get FORM_isolate $vcfg isolate 
     317                                config_get FORM_frag $vcfg frag 
    320318                                config_get FORM_rts $vcfg rts 
    321                                 config_get_bool FORM_hidden $vcfg hidden 
    322                                 config_get_bool FORM_isolate $vcfg isolate 
    323                                 config_get_bool FORM_bgscan $vcfg bgscan 
    324319                        else 
    325320                                eval FORM_key="\$FORM_radius_key_$vcfg" 
     
    374369 
    375370                        hidden="field|@TR<<ESSID Broadcast>>|broadcast_form_$vcfg|hidden 
    376                                 radio|broadcast_$vcfg|$FORM_hidden|0|@TR<<On>> 
    377                                 radio|broadcast_$vcfg|$FORM_hidden|1|@TR<<Off>>" 
     371                                select|broadcast_$vcfg|$FORM_hidden 
     372                                option|0|@TR<<Show>> 
     373                                option|1|@TR<<Hide>>" 
    378374                        append forms "$hidden" "$N" 
    379  
    380                         bgscan_field="field|@TR<<Background Client Scanning>>|bgscan_form_$vcfg|hidden 
    381                                         radio|bgscan_$vcfg|$FORM_bgscan|1|@TR<<On>> 
    382                                         radio|bgscan_$vcfg|$FORM_bgscan|0|@TR<<Off>>" 
    383                         append forms "$bgscan_field" "$N" 
    384                         append forms "helpitem|Backround Client Scanning" "$N" 
    385                         append forms "helptext|Helptext Backround Client Scanning#Enables or disables the ablility of a virtual interface to scan for other access points while in client mode. Disabling this allows for higher throughput but keeps your card from roaming to other access points with a higher signal strength." "$N" 
    386                         append forms "helplink|http://madwifi.org/wiki/UserDocs/PerformanceTuning" "$N" 
    387  
    388                         isolate_field="field|@TR<<AP Isolation>>|isolate_form_$vcfg|hidden 
    389                                         radio|isolate_$vcfg|$FORM_isolate|1|@TR<<On>> 
    390                                         radio|isolate_$vcfg|$FORM_isolate|0|@TR<<Off>>" 
    391                         append forms "$isolate_field" "$N" 
    392  
     375                         
    393376                        if [ "$iftype" = "atheros" ]; then 
    394377                        eval txpowers="\$CONFIG_wireless_${device}_txpower" 
    395                         [ -z "$txpowers" ] && { 
    396                                 txpower="" 
    397                                 for athname in $(ls /proc/sys/net/ 2>/dev/null | grep "^ath"); do 
    398                                         [ "$(cat /proc/sys/net/${athname}/\%parent)" = "$device" ] && { 
    399                                                 for power in $(iwlist $athname txpower 2>&1 | sed '/dBm/!d /Current/d; s/^[[:space:]]*//;' | cut -d ' ' -f 1); do 
    400                                                         txpower="$txpower $power" 
    401                                                 done 
    402                                                 break 
    403                                         } 
    404                                 done 
    405                                 [ "$txpower" = "" ] && { 
    406                                         athname=$(wlanconfig ath create wlandev $device wlanmode ap) 
    407                                         for power in $(iwlist ath0 txpower 2>&1 | sed '/dBm/!d /Current/d; s/^[[:space:]]*//;' | cut -d ' ' -f 1); do 
    408                                                 txpower="$txpower $power" 
    409                                         done 
    410                                         wlanconfig "$athname" destroy 
    411                                 } 
    412                                 [ "$txpower" != "" ] && { 
    413                                         txpowers="$txpower" 
    414                                         config_set wireless "${device}_txpower" "$txpower" 
    415                                         uci_set webif wireless "${device}_txpower" "$txpower" 
    416                                 } 
    417                         } 
    418378                        if [ "$txpowers" = "" ]; then 
    419379                                txpowers='1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16' 
     
    426386                        done 
    427387                        append forms "$txpower_field" "$N" 
    428  
     388                         
     389                        bgscan_field="field|@TR<<Backround Client Scanning>>|bgscan_form_$vcfg|hidden 
     390                                        select|bgscan_$vcfg|$FORM_bgscan 
     391                                        option|1|@TR<<On>> 
     392                                        option|0|@TR<<Off>>" 
     393                        append forms "$bgscan_field" "$N" 
     394                        append forms "helpitem|Backround Client Scanning" "$N" 
     395                        append forms "helptext|Helptext Backround Client Scanning#Enables or disables the ablility of a virtual interface to scan for other access points while in client mode. Disabling this allows for higher throughput but keeps your card from roaming to other access points with a higher signal strength." "$N" 
     396                        append forms "helplink|http://madwifi.org/wiki/UserDocs/PerformanceTuning" "$N" 
     397                         
    429398                        rts="field|@TR<<RTS (Default off)>> 
    430399                                text|rts_$vcfg|$FORM_rts" 
     
    436405                        fi 
    437406 
    438                         ssid="field|@TR<<ESSID>>|ssid_form_$vcfg 
     407                        isolate_field="field|@TR<<AP Isolation>>|isolate_form_$vcfg|hidden 
     408                                        select|isolate_$vcfg|$FORM_isolate 
     409                                        option|0|@TR<<Off>> 
     410                                        option|1|@TR<<On>>" 
     411                        append forms "$isolate_field" "$N" 
     412 
     413                        ssid="field|@TR<<ESSID>>|ssid_form_$vcfg|hidden 
    439414                                text|ssid_$vcfg|$FORM_ssid" 
    440415                        append forms "$ssid" "$N" 
    441  
     416                         
    442417                        bssid="field|@TR<<BSSID>>|bssid_form_$vcfg|hidden 
    443418                                text|bssid_$vcfg|$FORM_bssid" 
     
    553528                                append forms "$install_nas_button" "$N" 
    554529                        elif [ "$iftype" = "atheros" ]; then 
    555                                 install_hostapd_button="field|@TR<<HostAPD Package>>|install_hostapd_mini_$vcfg|hidden" 
    556                                 if [ "$hostapd_installed" != "1" -o "$hostapd_mini_installed" != "1" ]; then 
    557                                         install_hostapd_mini_button="$install_hostapd_mini_button 
    558                                                 string|<div class=\"warning\">PSK and PSK2 will not work until you install the HostAPD or HostAPD Mini package. (HostAPD Mini only does PSK and PSK2) </div> 
    559                                                 submit|install_hostapd_mini| Install HostAPD-Mini Package | 
    560                                                 submit|install_hostapd| Install HostAPD Package |" 
    561                                 else 
    562                                         install_hostapd_button="$install_hostapd_mini_button 
    563                                                 string|@TR<<Installed>>." 
    564                                 fi 
    565                                 if [ "$hostapd_installed" != "1" ]; then 
     530                                install_hostapd_button="field|@TR<<HostAPD Package>>|install_hostapd_$vcfg|hidden" 
     531                                if ! equal "$hostapd_installed" "1"; then 
    566532                                        install_hostapd_button="$install_hostapd_button 
    567533                                                string|<div class=\"warning\">WPA and WPA2 will not work until you install the HostAPD package. </div> 
     
    618584                                        } 
    619585                                } 
    620                                 v = (isset('mode_ap_$device','11b') || isset('mode_ap_$device','11bg') || isset('mode_ap_$device','11g') || ('$iftype'=='broadcom')); 
     586                                v = (isset('mode_ap_$device','11b') || isset('mode_ap_$device','11bg') || isset('mode_ap_$device','11g')); 
    621587                                set_visible('bgchannelform_$device', v); 
    622588                                v = (isset('mode_ap_$device','11a')); 
    623589                                set_visible('achannelform_$device', v); 
    624590                                v = (!isset('mode_$vcfg','wds')); 
     591                                set_visible('ssid_form_$vcfg', v); 
    625592                                set_visible('broadcast_form_$vcfg', v); 
    626593                                v = (isset('mode_$vcfg','wds')); 
     
    634601                                v = (('$iftype'=='broadcom') && (isset('encryption_$vcfg','psk')) && (isset('encryption_$vcfg','psk2') || isset('encryption_$vcfg','wpa') || isset('encryption_$vcfg','wpa2'))); 
    635602                                set_visible('install_nas_$vcfg', v); 
    636                                 v = (('$iftype'=='atheros') && (!isset('mode_$vcfg','sta')) && (isset('encryption_$vcfg','psk') || isset('encryption_$vcfg','psk2'))); 
    637                                 set_visible('install_hostapd_mini_$vcfg', v); 
    638                                 v = (('$iftype'=='atheros') && (!isset('mode_$vcfg','sta')) && (isset('encryption_$vcfg','wpa') || isset('encryption_$vcfg','wpa2'))); 
     603                                v = (('$iftype'=='atheros') && (!isset('mode_$vcfg','sta')) && (isset('encryption_$vcfg','psk') || isset('encryption_$vcfg','psk2') || isset('encryption_$vcfg','wpa') || isset('encryption_$vcfg','wpa2'))); 
    639604                                set_visible('install_hostapd_$vcfg', v); 
    640605                                v = (('$iftype'=='atheros') && (isset('mode_$vcfg','sta')) && (isset('encryption_$vcfg','psk') || isset('encryption_$vcfg','psk2') || isset('encryption_$vcfg','wpa') || isset('encryption_$vcfg','wpa2'))); 
     
    729694                                                uci_set "wireless" "$vcfg" "network" "$FORM_network" 
    730695                                                uci_set "wireless" "$vcfg" "ssid" "$FORM_ssid" 
    731                                                 FORM_bssid="`echo "$FORM_bssid" |tr "[A-Z]" "[a-z]"`" 
    732696                                                uci_set "wireless" "$vcfg" "bssid" "$FORM_bssid" 
    733697                                                uci_set "wireless" "$vcfg" "mode" "$FORM_mode" 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/reboot.sh

    r354 r386  
    99        uci_load "network" 
    1010        router_ip="$CONFIG_lan_ipaddr" 
    11         [ -n "$SERVER_PORT" ] && [ "$SERVER_PORT" != "80" ] && router_ip="$router_ip:$SERVER_PORT" 
    1211        header_inject_head="<meta http-equiv=\"refresh\" content=\"$timeout;http://$router_ip\" />" 
    1312        reboot_msg="@TR<<Rebooting now>>... 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-basic.sh

    r354 r386  
    103103progressbar|conntrackuse|@TR<<Used>>: $ACTIVE_CONNECTIONS ($USED_CONNECTIONS_PERCENT%)|200|$USED_CONNECTIONS_PERCENT|$USED_CONNECTIONS_PERCENT%|| 
    104104helpitem|Tracked Connections 
    105 helptext|Helptext Tracked Connections#This is the number of connections in your router's conntrack table. <a href="status-conntrackread.awx">View Conntrack Table</a>. 
     105helptext|Helptext Tracked Connections#This is the number of connections in your router's conntrack table. <a href="status-conntrackread.sh">View Conntrack Table</a> 
    106106end_form| 
    107107 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-diag.sh

    r354 r386  
    44################################################################### 
    55# Diagnostics 
     6# 
     7# This page is synchronized between kamikaze and WR branches. Changes to it *must*  
     8# be followed by running the webif-sync.sh script. 
    69# 
    710# Description: 
     
    7477        ps_search=$(echo "$diag_command" | cut -c 1-15) # todo: limitation, X char match resolution      
    7578        ps_results=$(ps | grep "$ps_search" | grep -v "grep") 
    76         _pid=$(echo $ps_results | cut -d ' ' -f 1 | sed 2,99d)    # older busybox 
    7779        equal $_pid "0" && _pid=$(echo $ps_results | cut -d ' ' -f 1 | sed 2,99d)  # newer busybox 
    7880        output_snapshot_file() { 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-interfaces.sh

    r354 r386  
    22<? 
    33. /usr/lib/webif/webif.sh 
    4  
     4uci_load network 
    55header "Status" "Interfaces" "@TR<<Interfaces>>" 
    66 
    7 config_load /etc/config/network 
    8 for cfgsec in $CONFIG_SECTIONS; do 
    9         eval "cfgtype=\$CONFIG_${cfgsec}_TYPE" 
    10         [ "$cfgtype" = "interface" ] && { 
    11                 iflow=$(echo "$cfgsec" | tr [A-Z] [a-z]) 
    12                 ifupr=$(echo "$cfgsec" | tr [a-z] [A-Z]) 
    13                 eval "${iflow}_name=\"$ifupr\"" 
    14                 eval "typebr=\"\$CONFIG_${cfgsec}_type\"" 
    15                 if [ "$typebr" =  "bridge" ]; then 
    16                         eval "${iflow}_iface=\"br-${cfgsec}\"" 
    17                         eval "${iflow}_bridge=\"1\"" 
    18                 else 
    19                         eval "${iflow}_iface=\"\$CONFIG_${cfgsec}_ifname\"" 
    20                 fi 
    21                 if [ "$iflow" != "wan" -a "$iflow" != "lan" ]; then 
    22                         frm_ifaces="$frm_ifaces $iflow" 
    23                 fi 
    24         } 
    25 done 
     7# get WAN stats 
     8wan_config=$(ifconfig 2>&1 | grep -A 6 "$CONFIG_wan_ifname[[:space:]]") 
     9if [ -n "$wan_config" ]; then 
     10wan_ip_addr=$(echo "$wan_config" | grep "inet addr" | cut -d: -f 2 | sed s/Bcast//g) 
     11wan_mac_addr=$(echo "$wan_config" | grep "HWaddr" | cut -d'H' -f 2 | cut -d' ' -f 2) 
     12wan_tx_packets=$(echo "$wan_config" | grep "TX packets" | sed s/'TX packets:'//g | cut -d' ' -f 11 | int2human) 
     13wan_rx_packets=$(echo "$wan_config" | grep "RX packets" | sed s/'RX packets:'//g | cut -d' ' -f 11 | int2human) 
     14wan_tx_bytes=$(echo "$wan_config" | grep "TX bytes" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 3) 
     15wan_rx_bytes=$(echo "$wan_config" | grep "TX bytes" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 2 | cut -d ')' -f 1) 
     16fi 
     17# get LAN stats 
     18lan_config=$(ifconfig 2>&1 | grep -A 6 "$CONFIG_lan_ifname[[:space:]]") 
     19if [ "$(uci get network.lan.type)" = "bridge" ]; then 
     20lan_ip_addr=$(ifconfig br-lan 2>&1 | grep "inet addr" | cut -d: -f 2 | sed s/Bcast//g) 
     21else 
     22lan_ip_addr=$(echo "$lan_config" | grep "inet addr" | cut -d: -f 2 | sed s/Bcast//g) 
     23fi 
     24lan_mac_addr=$(echo "$lan_config" | grep "HWaddr" | cut -d'H' -f 2 | cut -d' ' -f 2) 
     25lan_tx_packets=$(echo "$lan_config" | grep "TX packets" | sed s/'TX packets:'//g | cut -d' ' -f 11 | int2human) 
     26lan_rx_packets=$(echo "$lan_config" | grep "RX packets" | sed s/'RX packets:'//g | cut -d' ' -f 11 | int2human) 
     27lan_tx_bytes=$(echo "$lan_config" | grep "TX bytes" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 3) 
     28lan_rx_bytes=$(echo "$lan_config" | grep "TX bytes" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 2 | cut -d ')' -f 1) 
     29# get wifi stats 
     30wlan_config=$(iwconfig 2>&1 | grep -v 'no wireless' | grep '\w') 
     31wlan_ssid=$(echo "$wlan_config" | grep 'ESSID' | cut -d':' -f 2 | cut -d' ' -f 1 | sed s/'"'//g) 
     32wlan_mode=$(echo "$wlan_config" | grep "Mode:" | cut -d':' -f 2 | cut -d' ' -f 1) 
     33wlan_freq=$(echo "$wlan_config" | grep "Mode:" | cut -d':' -f 3 | cut -d' ' -f 1) 
     34wlan_ap=$(echo "$wlan_config" | grep "Mode:" | cut -d' ' -f 18) 
     35wlan_txpwr=$(echo "$wlan_config" | grep Tx-Power | cut -d'-' -f2 | cut -d':' -f 2 | cut -d' ' -f 1 | sed s/"dBm"//g) 
     36wlan_key=$(echo "$wlan_config" | grep "Encryption key:" | sed s/"Encryption key:"//) 
     37wlan_tx_retries=$(echo "$wlan_config" | grep "Tx excessive retries" | cut -d':' -f 2 | cut -d' ' -f 1) 
     38wlan_tx_invalid=$(echo "$wlan_config" | grep "Tx excessive retries" | cut -d':' -f 3 | cut -d' ' -f 1) 
     39wlan_tx_missed=$(echo "$wlan_config" | grep "Missed beacon" | cut -d':' -f 4 | cut -d' ' -f 1) 
     40wlan_rx_invalid_nwid=$(echo "$wlan_config" | grep "Rx invalid nwid:" | cut -d':' -f 2 | cut -d' ' -f 1) 
     41wlan_rx_invalid_crypt=$(echo "$wlan_config" | grep "Rx invalid nwid:" | cut -d':' -f 3 | cut -d' ' -f 1) 
     42wlan_rx_invalid_frag=$(echo "$wlan_config" | grep "Rx invalid nwid:" | cut -d':' -f 4 | cut -d' ' -f 1) 
     43wlan_noise=$(echo "$wlan_config" | grep "Link Noise level:" | cut -d':' -f 2 | cut -d' ' -f 1) 
     44#Find noise for atheros cards 
     45if [ -z "$wlan_noise" ]; then 
     46        wlan_noise=$(echo "$wlan_config" | grep "Noise level" | cut -d'=' -f 4 | cut -d' ' -f 1) 
     47fi 
    2648 
    27 config_load /etc/config/wireless 
    28 for cfgsec in $CONFIG_SECTIONS; do 
    29         eval "cfgtype=\$CONFIG_${cfgsec}_TYPE" 
    30         [ "$cfgtype" = "wifi-iface" ] && { 
    31                 eval "wdevice=\"\$CONFIG_${cfgsec}_device\"" 
    32                 eval "manuf=\"\$CONFIG_${wdevice}_type\"" 
    33                 case "$manuf" in 
    34                         atheros) 
    35                                 ath_cnt=$(( $ath_cnt + 1 )) 
    36                                 cur_iface=$(printf "ath%d" "$(( $ath_cnt - 1))") 
    37                         ;; 
    38                         *) 
    39                                 eval "wdcnt=${wdevice}_cnt" 
    40                                 wdcnt=$(( $wdcnt + 1 )) 
    41                                 eval "${wdevice}_cnt=$wdcnt" 
    42                                 if [ "$wdcnt" -gt 1 ]; then 
    43                                         cur_iface=$(printf "$wdevice.%d" "$(( $wdcnt - 1))") 
    44                                 else 
    45                                         cur_iface="$wdevice" 
    46                                 fi 
    47                         ;; 
    48                 esac 
    49                 eval "cfgnet=\$CONFIG_${cfgsec}_network" 
    50                 eval "isbridge=\"${cfgnet}_bridge\"" 
    51                 if [ "$isbridge" != "1" ]; then 
    52                         eval "${cfgnet}_iface=\"${cur_iface}\"" 
    53                 fi 
    54                 frm_wifaces="$frm_wifaces $cur_iface" 
    55         } 
    56 done 
    5749 
    58 displaydns() { 
    59         local resconf form_dns_servers 
    60         resconf=$(cat /etc/dnsmasq.conf | grep "^resolv-file=" | cut -d'=' -f 2) 
    61         resconf="${resconf:-"/etc/resolv.conf"}" 
    62         form_dns_servers=$(awk ' 
    63 BEGIN { counter=1 } 
    64 /nameserver/ { 
    65         print "field|@TR<<DNS Server>> " counter "|dns_server_" counter "\n string|" $2 "\n"  
    66         counter+=1 
    67 }' "$resconf" 2>/dev/null) 
    68         display_form <<EOF 
    69 start_form|@TR<<DNS Servers>> 
     50# set unset vars 
     51wlan_freq="${wlan_freq:-0}" 
     52wlan_noise="${wlan_noise:-0}" 
     53wlan_txpwr="${wlan_txpwr:-0}" 
     54 
     55# enumerate WAN nameservers 
     56form_dns_servers=$(awk ' 
     57        BEGIN { counter=1 } 
     58        /nameserver/ {print "field|@TR<<DNS Server>> " counter "|dns_server_" counter "\n string|" $2 "\n" ;counter+=1} 
     59        ' /etc/resolv.conf 2> /dev/null) 
     60 
     61if [ -n "$wan_config" ]; then 
     62display_form <<EOF 
     63 
     64start_form|@TR<<WAN>> 
     65field|@TR<<MAC Address>>|wan_mac_addr 
     66string|<div class="mac-address">$wan_mac_addr</div> 
     67field|@TR<<IP Address>>|wan_ip_addr 
     68string|$wan_ip_addr 
    7069$form_dns_servers 
     70field|@TR<<Received>>|wan_rx 
     71string|$wan_rx_packets @TR<<status_interfaces_pkts#pkts>> &nbsp;($wan_rx_bytes) 
     72field|@TR<<Transmitted>>|wan_tx 
     73string|$wan_tx_packets @TR<<status_interfaces_pkts#pkts>> &nbsp; ($wan_tx_bytes 
     74helpitem|WAN 
     75helptext|WAN WAN#WAN stands for Wide Area Network and is usually the upstream connection to the internet. 
    7176end_form 
    7277EOF 
    73 
     78fi 
    7479 
    75 displayiface() { 
    76         local ifpar="$1" 
    77         local config ip_addr mac_addr form_mac tx_packets rx_packets tx_bytes rx_bytes 
    78         eval "iface=\$${ifpar}_iface" 
    79         if [ -n "$iface" ]; then 
    80                 config=$(ifconfig "$iface" 2>/dev/null) 
    81                 [ -n "$config" ] && { 
    82                         ip_addr=$(echo "$config" | grep "inet addr:" | cut -d: -f 2 | cut -d' ' -f 1) 
    83                         ip_addr="${ip_addr:-"&nbsp;"}" 
    84                         mac_addr=$(echo "$config" | grep "HWaddr" | cut -d'H' -f 2 | cut -d' ' -f 2) 
    85                         [ -n "$mac_addr" ] && form_mac="field|@TR<<MAC Address>>|${ifpar}_mac_addr 
    86 string|$mac_addr" 
    87                         tx_packets=$(echo "$config" | grep "TX packets:" | sed s/'TX packets:'//g | cut -d' ' -f 11 | int2human) 
    88                         tx_packets="${tx_packets:-0}" 
    89                         rx_packets=$(echo "$config" | grep "RX packets:" | sed s/'RX packets:'//g | cut -d' ' -f 11 | int2human) 
    90                         rx_packets="${rx_packets:-0}" 
    91                         tx_bytes=$(echo "$config" | grep "TX bytes:" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 3 | cut -d ')' -f 1) 
    92                         tx_bytes="${tx_bytes:-0}" 
    93                         rx_bytes=$(echo "$config" | grep "TX bytes:" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 2 | cut -d ')' -f 1) 
    94                         rx_bytes="${rx_bytes:-0}" 
    95                         eval "if_name=\"\$${ifpar}_name\"" 
    96                         display_form <<EOF 
    97 start_form|$if_name 
    98 $form_mac 
    99 field|@TR<<IP Address>>|${ifpar}_ip_addr 
    100 string|$ip_addr 
    101 field|@TR<<Received>>|${ifpar}_rx 
    102 string|$rx_packets @TR<<status_interfaces_pkts#pkts>>&nbsp;($rx_bytes) 
    103 field|@TR<<Transmitted>>|${ifpar}_tx 
    104 string|$tx_packets @TR<<status_interfaces_pkts#pkts>>&nbsp;($tx_bytes) 
    105 EOF 
    106                         case "$ifpar" in 
    107                                 wan) 
    108                                         form_help="helpitem|WAN 
    109 helptext|WAN WAN#WAN stands for Wide Area Network and is usually the upstream connection to the internet." 
    110                                 ;; 
    111                                 lan) 
    112                                         form_help="helpitem|LAN 
    113 helptext|LAN LAN#LAN stands for Local Area Network." 
    114                                 ;; 
    115                                 loopback) 
    116                                         form_help="helpitem|LOOPBACK 
    117 helptext|LOOPBACK_helptext#A loopback interface is a type of 'circuitless IP address' or 'virtual IP' address, as the IP address is not associated with any one particular interface (or circuit) on the host or router. Any traffic that a computer program sends on the loopback network is addressed to the same computer." 
    118                                 ;; 
    119                                 *) 
    120                                         form_help="" 
    121                                 ;; 
    122                         esac 
    123                         display_form <<EOF 
    124 $form_help 
     80display_form <<EOF 
     81start_form|@TR<<LAN>> 
     82field|@TR<<MAC Address>>|lan_mac_addr 
     83string|$lan_mac_addr 
     84field|@TR<<IP Address>>|lan_ip_addr 
     85string|$lan_ip_addr 
     86field|@TR<<Received>>|lan_rx 
     87string|$lan_rx_packets @TR<<status_interfaces_pkts#pkts>> &nbsp;($lan_rx_bytes) 
     88field|@TR<<Transmitted>>|lan_tx 
     89string|$lan_tx_packets @TR<<status_interfaces_pkts#pkts>> &nbsp;($lan_tx_bytes 
     90helpitem|LAN 
     91helptext|LAN LAN#LAN stands for Local Area Network. 
    12592end_form 
    126 EOF 
    127                 } 
    128         fi 
    129 } 
    13093 
    131 displaywiface() { 
    132         local wifpar="$1" 
    133         local wconfig wlan_ssid wlan_mode wlan_freq wlan_ap wlan_txpwr wlan_key wlan_tx_retries 
    134         local wlan_tx_invalid wlan_tx_missed wlan_rx_invalid_nwid wlan_rx_invalid_crypt 
    135         local wlan_rx_invalid_frag wlan_noise 
    136         if [ -n "$wifpar" ]; then 
    137                 local wnum="$2" 
    138                 wnum="${wnum:-0}" 
    139                 wconfig=$(iwconfig "$wifpar" 2>/dev/null) 
    140                 [ -n "$wconfig" ] && { 
    141                         wlan_ssid=$(echo "$wconfig" | grep "ESSID:" | cut -d'"' -f 2 | cut -d'"' -f 1) 
    142                         wlan_mode=$(echo "$wconfig" | grep "Mode:" | cut -d':' -f 2 | cut -d' ' -f 1) 
    143                         wlan_freq=$(echo "$wconfig" | grep "Frequency:" | cut -d':' -f 3 | cut -d' ' -f 1) 
    144                         wlan_freq="${wlan_freq:-0}" 
    145                         wlan_ap=$(echo "$wconfig" | sed '/Access Point:/!d; s/^.*Access Point://; s/[[:space:]]//') 
    146                         wlan_txpwr=$(echo "$wconfig" | sed '/Tx-Power=/!d; s/^.*Tx-Power=//; s/[[:space:]].*$//') 
    147                         wlan_txpwr="${wlan_txpwr:-0}" 
    148                         wlan_key=$(echo "$wconfig" | sed '/Encryption key:/!d; s/^.*Encryption key://; s/[[:space:]].*$//') 
    149                         wlan_secmode=$(echo "$wconfig" | sed '/Security mode:/!d; s/^.*Security mode://') 
    150                         wlan_tx_retries=$(echo "$wconfig" | sed '/Tx excessive retries:/!d; s/^.*Tx excessive retries://; s/[[:space:]].*$//') 
    151                         wlan_tx_retries="${wlan_tx_retries:-0}" 
    152                         wlan_tx_invalid=$(echo "$wconfig" | sed '/Invalid misc:/!d; s/^.*Invalid misc://; s/[[:space:]].*$//') 
    153                         wlan_tx_invalid="${wlan_tx_invalid:-0}" 
    154                         wlan_tx_missed=$(echo "$wconfig" | sed '/Missed beacon:/!d; s/^.*Missed beacon://; s/[[:space:]].*$//') 
    155                         wlan_tx_missed="${wlan_tx_missed:-0}" 
    156                         wlan_rx_invalid_nwid=$(echo "$wconfig" | sed '/Rx invalid nwid:/!d s/^.*Rx invalid nwid://; s/[[:space:]].*$//') 
    157                         wlan_rx_invalid_nwid="${wlan_rx_invalid_nwid:-0}" 
    158                         wlan_rx_invalid_crypt=$(echo "$wconfig" | sed '/Rx invalid crypt:/!d; s/^.*Rx invalid crypt://; s/[[:space:]].*$//') 
    159                         wlan_rx_invalid_crypt="${wlan_rx_invalid_crypt:-0}" 
    160                         wlan_rx_invalid_frag=$(echo "$wconfig" | sed '/Rx invalid frag:/!d; s/^.*Rx invalid frag://; s/[[:space:]].*$//') 
    161                         wlan_rx_invalid_frag="${wlan_rx_invalid_frag:-0}" 
    162                         wlan_noise=$(echo "$wconfig" | sed '/Link Noise level:/!d; s/^.*Link Noise level://; s/[[:space:]].*$//') 
    163                         if [ -z "$wlan_noise" ]; then 
    164                                 wlan_noise=$(echo "$wconfig" | sed '/Noise level=/!d; s/^.*Noise level=//; s/[[:space:]].*$//') 
    165                         fi 
    166                         wlan_noise="${wlan_noise:-0}" 
    167                         [ "$wnum" = "0" ] && wnum="" 
    168                         display_form <<EOF 
    169 start_form|@TR<<WLAN>> $wnum 
     94start_form|@TR<<WLAN>> 
    17095field|@TR<<Access Point>>|wlan_ap 
    17196string|$wlan_ap 
     
    175100string|$wlan_ssid 
    176101field|@TR<<Frequency>>|wlan_freq 
    177 string|$wlan_freq @TR<<GHz>> 
     102string|$wlan_freq Ghz 
    178103field|@TR<<Transmit Power>>|wlan_txpwr 
    179 string|$wlan_txpwr @TR<<dBm>> 
     104string|$wlan_txpwr dBm 
    180105field|@TR<<Noise Level>>|wlan_noise 
    181 string|$wlan_noise @TR<<dBm>> 
     106string|$wlan_noise dBm 
    182107field|@TR<<Encryption Key>>|wlan_key 
    183108string|$wlan_key 
    184 field|@TR<<Security mode>>|wlan_secmode 
    185 string|$wlan_secmode 
    186109field|@TR<<Rx Invalid nwid>>|wlan_rx_invalid_nwid 
    187110string|$wlan_rx_invalid_nwid 
     
    195118string|$wlan_tx_missed 
    196119helpitem|WLAN 
    197 helptext|WLAN LAN#WLAN stands for Wireless Local Area Network. 
    198 end_form 
    199 EOF 
    200  
    201                 } 
    202         fi 
    203 
    204  
    205 displayiface wan 
    206 displaydns 
    207 displayiface lan 
    208 for iface in $frm_ifaces; do 
    209         displayiface $iface 
    210 done 
    211 cntr=0 
    212 for wiface in $frm_wifaces; do 
    213         displaywiface $wiface $cntr 
    214         cntr=$(( $cntr +1 )) 
    215 done 
    216  
    217  
    218 ######################################### 
    219 # raw stats 
    220 display_form <<EOF 
    221 start_form|@TR<<Raw Information>> 
    222 EOF 
    223 if empty "$FORM_show_raw_stats"; then 
    224         display_form <<EOF 
     120helptext|WLAN LAN#LAN stands for Wireless Local Area Network. 
     121field||spacer1 
     122string|<br /><br /> 
    225123field||show_raw 
    226124formtag_begin|raw_stats|$SCRIPT_NAME 
     
    229127end_form 
    230128EOF 
    231 else 
    232         cat <<EOF 
    233129 
    234 <tr> 
    235         <th><b>@TR<<Interfaces Status WAN|WAN Interface>></b></th> 
    236 </tr> 
    237 <tr> 
    238         <td><div class="smalltext"><pre> 
     130######################################### 
     131# raw stats 
     132! empty "$FORM_show_raw_stats" && { 
     133 
     134display_form <<EOF 
     135start_form|@TR<<Raw Information>> 
    239136EOF 
    240         [ -n "$wan_iface" ] && { 
    241                 ifconfig "$wan_iface" 2>/dev/null 
    242         } 
    243         cat <<EOF 
    244 </pre></div></td> 
    245 </tr> 
    246 <tr> 
    247         <th><b>@TR<<Interfaces Status LAN|LAN Interface>></b></th> 
    248 </tr> 
    249 <tr> 
    250         <td><div class="smalltext"><pre> 
    251 EOF 
    252         [ -n "$lan_iface" ] && { 
    253                 ifconfig "$lan_iface" 2>/dev/null 
    254         } 
    255         cat <<EOF 
    256 </pre></div></td> 
    257 </tr> 
    258 EOF 
    259         for iface in $frm_ifaces; do 
    260                 eval "dispiface=\$${iface}_iface" 
    261                 [ -n "$dispiface" ] && { 
    262                         eval "if_name=\"\$${iface}_name\"" 
    263                 cat <<EOF 
    264 <tr> 
    265         <th><b>$if_name @TR<<Interfaces Status Other|Interface>></th> 
    266 </tr> 
    267 <tr> 
    268         <td><div class="smalltext"><pre> 
    269 EOF 
    270                 ifconfig "$dispiface" 2>/dev/null 
    271                 cat <<EOF 
    272 </pre></div></td> 
    273 </tr> 
    274 EOF 
    275                 } 
    276         done 
    277         cntr=0 
    278         for wiface in $frm_wifaces; do 
    279                 [ -n "$wiface" ] && { 
    280                         [ "$cntr" -eq 0 ] && dcntr="" || dcntr=" $cntr" 
    281                         cat <<EOF 
    282 <tr> 
    283         <th><b>@TR<<Interfaces Status WLAN nr|Wireless Interface>>$dcntr</b></th> 
    284 </tr> 
    285 <tr> 
    286         <td><div class="smalltext"><pre> 
    287 EOF 
    288                         iwconfig "$wiface" 2>/dev/null 
    289         cat <<EOF 
    290 </pre></div></td> 
    291 </tr> 
    292 EOF 
    293                 } 
    294                 cntr=$(( $cntr +1 )) 
    295         done 
    296         display_form <<EOF 
     137 
     138echo "<tr><td><br /></td></tr> 
     139        <div class=\"smalltext\"> 
     140                <tr> 
     141                        <th><b>@TR<<Interfaces Status WAN|WAN Interface>></b></th> 
     142                </tr> 
     143                <tr> 
     144                        <td><pre>" 
     145ifconfig 2>&1 | grep -A 6 "$CONFIG_wan_ifname[[:space:]]" 
     146echo "</pre></td> 
     147                </tr> 
     148                <tr><td><br /><br /></td></tr> 
     149                <tr> 
     150                        <th><b>@TR<<Interfaces Status LAN|LAN Interface>></b></th> 
     151                </tr> 
     152                <tr> 
     153                        <td><pre>" 
     154ifconfig 2>&1 | grep -A 6 "$CONFIG_lan_ifname[[:space:]]" 
     155echo "</pre></td> 
     156                </tr> 
     157                <tr><td><br /><br /></td></tr> 
     158                <tr> 
     159                        <th><b>@TR<<Interfaces Status WLAN|Wireless Interface>></b></th> 
     160                </tr> 
     161                <tr> 
     162                        <td><pre>" 
     163iwconfig 2>&1 | grep -v 'no wireless' | grep '\w' 
     164echo "</pre></td> 
     165                </tr> 
     166                </div>" 
     167 
     168display_form <<EOF 
    297169end_form 
    298170EOF 
    299 fi 
     171
    300172 
    301173footer ?> 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-processes.sh

    r354 r386  
    135135        tr_ind = "" 
    136136        td_ind = "\t" 
    137 } 
    138 function readcmdline(pid) { 
    139         if (("/bin/cat /proc/" pid "/cmdline 2>/dev/null | tr \"\\0\" \" \"" | getline) > 0) return $0 
    140         else return "" 
    141137} 
    142138{ 
     
    176172                lcol = $5 
    177173                for (i=6; i<=NF; i++) lcol = lcol " " $i 
    178                 if (length(lcol) >= 50) { 
    179                         fulcmd = readcmdline($1) 
    180                         if (fulcmd) lcol = fulcmd 
    181                 } 
    182174                print td_ind "<td>" lcol "</td>" 
    183175                if (interval < 1) { 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-qos.sh

    r354 r386  
    7979if ! empty "$qos_status" && exists "/usr/bin/qos-stat"; then 
    8080ingress_start_line=$(echo "$qos_status" | grep INGRESS -n | cut -d ':' -f 1) 
    81 ingress_start_line=$(( $ingress_start_line - 2 )) 2>/dev/null 
    8281egress_status=$(echo "$qos_status" | sed "$ingress_start_line,\$ d") 
    8382ingress_status=$(echo "$qos_status" | sed "1,$ingress_start_line d") 
    84 ingress_stats_table=$(echo -e "$ingress_status\n" |  
     83ingress_stats_table=$(echo "$ingress_status" |  
    8584        (awk \ 
    8685                -v root_class="$root_class" \ 
     
    102101                                } else { 
    103102                                        class="Unknown" $3 
     103                                }                                                                                                                
     104                                getline          
     105                                print "<tr>" 
     106                                print " <td class=\"text\">" class "</td>" 
     107                                print " <td>" $4 "</td>" 
     108                                printf "        <td>%d</td>\n", $2 
     109                                if ($2 >= 2 ** 30) { 
     110                                        printf "        <td>(%.1f @TR<<GiB>>)</td>\n", $2 / (2 ** 30) 
     111                                } else if ($2 >= 2 ** 20) { 
     112                                        printf "        <td>(%.1f @TR<<MiB>>)</td>\n", $2 / (2 ** 20) 
     113                                } else if ($2 >= 2 ** 10) { 
     114                                        printf "        <td>(%.1f @TR<<KiB>>)</td>\n", $2 / (2 ** 10) 
     115                                } else { 
     116                                        print " <td>&nbsp;</td>" 
    104117                                } 
    105                                 getline 
    106                                 if (length($0) > 0) { 
    107                                         print "<tr>" 
    108                                         print " <td class=\"text\">" class "</td>" 
    109                                         print " <td>" $4 "</td>" 
    110                                         printf "        <td>%d</td>\n", $2 
    111                                         if ($2 >= 2 ** 30) { 
    112                                                 printf "        <td>(%.1f @TR<<GiB>>)</td>\n", $2 / (2 ** 30) 
    113                                         } else if ($2 >= 2 ** 20) { 
    114                                                 printf "        <td>(%.1f @TR<<MiB>>)</td>\n", $2 / (2 ** 20) 
    115                                         } else if ($2 >= 2 ** 10) { 
    116                                                 printf "        <td>(%.1f @TR<<KiB>>)</td>\n", $2 / (2 ** 10) 
    117                                         } else { 
    118                                                 print " <td>&nbsp;</td>" 
    119                                         } 
    120                                         print "</tr>" 
    121                                 } 
     118                                print "</tr>" 
    122119                        } 
    123120                }')) 
     
    142139 
    143140 
    144 egress_stats_table=$(echo -e "$egress_status\n" |  
     141egress_stats_table=$(echo "$egress_status" |  
    145142        (awk \ 
    146143                -v root_class="$root_class" \ 
     
    162159                                } else { 
    163160                                        class="Unknown" $3 
     161                                }                                                                                
     162                                getline 
     163                                print "<tr>" 
     164                                print " <td class=\"text\">" class "</td>" 
     165                                print " <td>" $4 "</td>" 
     166                                printf "        <td>%d</td>\n", $2 
     167                                if ($2 >= 2 ** 30) { 
     168                                        printf "        <td>(%.1f @TR<<GiB>>)</td>\n", $2 / (2 ** 30) 
     169                                } else if ($2 >= 2 ** 20) { 
     170                                        printf "        <td>(%.1f @TR<<MiB>>)</td>\n", $2 / (2 ** 20) 
     171                                } else if ($2 >= 2 ** 10) { 
     172                                        printf "        <td>(%.1f @TR<<KiB>>)</td>\n", $2 / (2 ** 10) 
     173                                } else { 
     174                                        print " <td>&nbsp;</td>" 
    164175                                } 
    165                                 getline 
    166                                 if (length($0) > 0) { 
    167                                         print "<tr>" 
    168                                         print " <td class=\"text\">" class "</td>" 
    169                                         print " <td>" $4 "</td>" 
    170                                         printf "        <td>%d</td>\n", $2 
    171                                         if ($2 >= 2 ** 30) { 
    172                                                 printf "        <td>(%.1f @TR<<GiB>>)</td>\n", $2 / (2 ** 30) 
    173                                         } else if ($2 >= 2 ** 20) { 
    174                                                 printf "        <td>(%.1f @TR<<MiB>>)</td>\n", $2 / (2 ** 20) 
    175                                         } else if ($2 >= 2 ** 10) { 
    176                                                 printf "        <td>(%.1f @TR<<KiB>>)</td>\n", $2 / (2 ** 10) 
    177                                         } else { 
    178                                                 print " <td>&nbsp;</td>" 
    179                                         } 
    180                                         print "</tr>" 
    181                                 } 
     176                                print "</tr>" 
    182177                        } 
    183178                }')) 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-usb.sh

    r354 r386  
    88 
    99if ! empty "$FORM_umount"; then 
    10         if ! empty "$FORM_mountdev"; then 
    11                 err_umount=$(umount $FORM_mountdev 2>&1) 
     10        if ! empty "$FORM_mountpoint"; then 
     11                err_umount=$(umount $FORM_mountpoint 2>&1) 
    1212                ! equal "$?" "0" && { 
    1313                        ERROR="@TR<<status_usb_umount_error_in#Error in>> $err_umount" 
     
    8585<table style="width: 90%; margin-left: 2.5em; text-align: left; font-size: 0.9em;" border="0" cellpadding="3" cellspacing="2"> 
    8686<? 
    87 mounted_devices="$(cat /proc/mounts | grep "^/dev/sd[a-p]\{0,2\}[[:space:]]")" 
     87mounted_devices="$(cat /proc/mounts | grep "^/dev/scsi/")" 
    8888! equal "$mounted_devices" "" && { 
    8989        echo "$mounted_devices" | awk ' 
     
    113113                print "         <td>" $2 "</td>" 
    114114                print "         <td>" $3 "</td>" 
    115                 $4 = "," $4 "," 
    116                 if ($4 ~ /,ro,/) 
     115                if ($4 == "ro") 
    117116                        print "         <td>@TR<<status_usb_ro#Read only>></td>" 
    118                 else if ($4 ~ /,rw,/
     117                else if ($4 == "rw"
    119118                        print "         <td>@TR<<status_usb_rw#Read/Write>></td>" 
    120119                else 
    121                         print "         <td>&nbsp;</td>" 
    122                 print "         <td><form method=\"post\" action='$SCRIPT_NAME'><input type=\"submit\" value=\" @TR<<status_usb_umount#umount>> \" name=\"umount\" /><input type=\"hidden\" value=\"" $1 "\" name=\"mountdev\" /></form></td>" 
     120                        print "         <td>" $4 "</td>" 
     121                print "         <td><form method=\"post\" action='$SCRIPT_NAME'><input type=\"submit\" value=\" @TR<<status_usb_umount#umount>> \" name=\"umount\" /><input type=\"hidden\" value=\"" $2 "\" name=\"mountpoint\" /></form></td>" 
    123122                print " </tr>" 
    124123        } 
     
    129128        mnts="$(echo "$mounted_devices" | awk ' 
    130129        { 
    131                 sub(/[[:digit:]]{0,2}$/, "", $1) 
     130                sub(/\/part[[:digit:]]{1,2}.*$/, "", $1) 
    132131            print $1 
    133132            print $2 
     
    150149        swap_devices="$(cat "/proc/swaps" 2>/dev/null | egrep "$mnts")" 
    151150} || { 
    152         swap_devices="$(cat "/proc/swaps" 2>/dev/null | grep "^/dev/sd[a-p]\{0,2\}[[:space:]]")" 
     151        swap_devices="$(cat "/proc/swaps" 2>/dev/null | grep "^/dev/scsi/")" 
    153152} 
    154153! empty "$swap_devices" && { 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-ipkg.sh

    r354 r386  
    4040        (action=="remove" ? "@TR<<system_ipkg_remove|remove>>" : action); 
    4141if (window.confirm("@TR<<Please Confirm>>!\n\n@TR<<Do you want to>> " + actionStr + " \"" + pkg + "\" @TR<<system_ipkg_package|package>>?")){ 
    42 window.location="system-ipkg.sh?action=" + action + "&amp;pkg=" + pkg 
     42window.location="ipkg.sh?action=" + action + "&amp;pkg=" + pkg 
    4343} } 
    4444</script> 
     
    133133EOF 
    134134?> 
    135 <tr><td><a href="system-ipkg.sh?action=update">@TR<<system_ipkg_updatelists#Update package lists>></a></td></tr> 
     135<tr><td><a href="ipkg.sh?action=update">@TR<<system_ipkg_updatelists#Update package lists>></a></td></tr> 
    136136<? 
    137137display_form <<EOF 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-password.sh

    r354 r386  
    66        SAVED=1 
    77        validate <<EOF 
    8 string|FORM_pw1|@TR<<Password>>|required min=5|$FORM_pw1 
     8string|FORM_pw1|Password|required min=5|$FORM_pw1 
    99EOF 
    1010        equal "$FORM_pw1" "$FORM_pw2" || { 
    11                 [ -n "$ERROR" ] && ERROR="${ERROR}<br />" 
    12                 ERROR="${ERROR}@TR<<Passwords do not match>><br />" 
     11                ERROR="$ERROR Passwords do not match<br />" 
    1312        } 
    1413        empty "$ERROR" && { 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-settings.sh

    r354 r386  
    1717# Major revisions: 
    1818# 
     19# NVRAM variables referenced: 
     20#       time_zone 
     21#       ntp_server 
     22# 
    1923# Configuration files referenced: 
    2024#   none 
    2125# 
    22  
    23 # handle old/current ntpclient configuration 
    24 grep -q "^[[:space:]]*ntpclient)" /etc/hotplug.d/iface/*-ntpclient 2>/dev/null && ntpcliconf="ntpclient" || ntpcliconf="ntp_client" 
    25  
    26 # Add NTP Server 
    27 if ! empty "$FORM_add_ntpcfg_number"; then 
    28         uci_add "$ntpcliconf" "$ntpcliconf" "" 
    29         uci_set "$ntpcliconf" "cfg$FORM_add_ntpcfg_number" "hostname" "" 
    30         uci_set "$ntpcliconf" "cfg$FORM_add_ntpcfg_number" "port" "123" 
    31         uci_set "$ntpcliconf" "cfg$FORM_add_ntpcfg_number" "count" "1" 
    32         FORM_add_ntpcfg="" 
    33 fi 
    34  
    35 # Remove NTP Server 
    36 if ! empty "$FORM_remove_ntpcfg"; then 
    37         uci_remove "$ntpcliconf" "$FORM_remove_ntpcfg" 
    38 fi 
    3926 
    4027config_cb() { 
     
    4734                        timezone_cfg="$CONFIG_SECTION" 
    4835                ;; 
    49                 ntp_client|ntpclient) 
    50                         append ntpservers "$CONFIG_SECTION" "$N" 
    51                 ;; 
    5236        esac 
    5337} 
    5438 
     39is_bcm947xx && { 
     40        load_settings "system" 
     41        load_settings "webif" 
     42} 
     43 
    5544uci_load "webif" 
    56 uci_load "webifssl" 
    5745uci_load "system" 
    58 #We have to load the system host name setting here because ntp_client also uses the hostname setting. 
    59 eval CONFIG_systemhostname="\$CONFIG_${hostname_cfg}_hostname" 
    60 FORM_hostname="${FORM_hostname:-$CONFIG_systemhostname}" 
    61 FORM_hostname="${FORM_hostname:-OpenWrt}" 
    62 config_clear "$hostname_cfg" 
    6346uci_load "network" 
    6447uci_load "timezone" 
    65 uci_load "$ntpcliconf" 
    66  
    67 #FIXME: uci_load bug 
    68 #uci_load will pass the same config twice when there is a section to be added by using uci_add before a uci_commit happens 
    69 #we will use uniq so we don't try to parse the same config section twice. 
    70 ntpservers=$(echo "$ntpservers" |uniq) 
    71  
    72 ntpcfg_number=$(echo "$ntpservers" |wc -l) 
    73 let "ntpcfg_number+=1" 
     48 
     49 
     50##################################################################### 
     51# defaults 
     52
     53# Overclocking note: 
     54#  we only handle 3302 0.8 since these are usually safer if they have 
     55#  the same default CFE as found on Linksys WRT54G(S) v4+, as it 
     56#  will handle invalid clock frequencies more gracefully and default 
     57#  to a limit of 250mhz. It also has a fixed divider, so sbclock 
     58#  frequencies are implied, and ignored if specified. 
     59
     60OVERCLOCKING_DISABLED="1" # set to 1 to disble OC support, we disable overclocking by default for kamikaze and only enable it for bcm947xx 
     61is_bcm947xx && { 
     62        OVERCLOCKING_DISABLED="0" 
     63
    7464 
    7565##################################################################### 
    7666header "System" "Settings" "@TR<<System Settings>>" ' onload="modechange()" ' "$SCRIPT_NAME" 
     67 
     68##################################################################### 
     69# todo: CPU_MODEL not actually used atm (except in building version) 
     70equal "$OVERCLOCKING_DISABLED" "0" && { 
     71        CPU_MODEL=$(sed -n "/cpu model/p" "/proc/cpuinfo") 
     72        CPU_VERSION=$(echo "$CPU_MODEL" | sed -e "s/BCM3302//" -e "s/cpu model//" -e "s/://") 
     73        #echo "debug.model: $CPU_MODEL <br />" 
     74        #echo "debug.version: $CPU_VERSION <br />" 
     75} 
    7776 
    7877##################################################################### 
     
    8584fi 
    8685 
    87 generate_ssl_key() { 
    88         local inst_packages llib llink libsymlinks 
    89         is_package_installed "zlib" 
    90         [ "$?" != "0" ] && inst_packages="$inst_packages zlib" 
    91         is_package_installed "libopenssl" 
    92         [ "$?" != "0" ] && inst_packages="$inst_packages libopenssl" 
    93         is_package_installed "openssl-util" 
    94         [ "$?" != "0" ] && inst_packages="$inst_packages openssl-util" 
    95         [ -n "$inst_packages" ] && ipkg -d ram install $inst_packages -force-overwrite 
    96         is_package_installed "openssl-util" 
    97         if [ "$?" = "0" ]; then 
    98                 for llib in $(ls /tmp/usr/lib/libssl.so.* /tmp/usr/lib/libcrypto.so.* /tmp/usr/lib/libz.so.* /tmp/usr/bin/openssl 2>/dev/null); do 
    99                         llink=$(echo "$llib" | sed 's/\/tmp//') 
    100                         ln -s $llib $llink 
    101                         [ "$?" = "0" ] && libsymlinks="$libsymlinks $llink" 
    102                 done 
    103                 if [  -z "$(ps -A | grep "[n]tpd\>")" ]; then 
    104                         is_package_installed "ntpclient" 
    105                         [ "$?" != "0" ] && { 
    106                                 echo "@TR<<system_settings_Updating_time#Updating time>> ..." 
    107                                 rdate -s pool.ntp.org 
    108                         } 
    109                 fi 
    110                 export RANDFILE="/tmp/.rnd" 
    111                 dd if=/dev/urandom of="$RANDFILE" count=1 bs=512 2>/dev/null 
    112                 (openssl genrsa -out /etc/ssl/matrixtunnel.key 2048; openssl req -new -batch -nodes -key /etc/ssl/matrixtunnel.key -out /etc/ssl/matrixtunnel.csr; openssl x509 -req -days 365 -in /etc/ssl/matrixtunnel.csr -signkey /etc/ssl/matrixtunnel.key -out /etc/ssl/matrixtunnel.cert) 
    113                 rm -f "$RANDFILE" 2>/dev/null 
    114                 unset RANDFILE 
    115         fi 
    116         [ -n "$libsymlinks" ] && rm -f $libsymlinks 
    117         [ -n "$inst_packages" ] && ipkg remove $inst_packages 
    118 } 
    119  
    12086if ! empty "$FORM_install_stunnel"; then 
    12187        echo "@TR<<system_settings_Installing_MatrixTunnel_package#Installing MatrixTunnel package>> ...<pre>" 
    12288        install_package "matrixtunnel" 
    123         is_package_installed "matrixtunnel" 
    124         [ "$?" = "0" ] && [ ! -e /etc/ssl/matrixtunnel.key -o ! -e /etc/ssl/matrixtunnel.cert ] && { 
    125                 echo "@TR<<system_settings_Generating_SSL_certificate#Generating SSL certificate>> ..." 
    126                 generate_ssl_key 
    127         } 
    128         echo "</pre><br />" 
    129 fi 
    130 if ! empty "$FORM_generate_certificate"; then 
    131         echo "@TR<<system_settings_Generating_SSL_certificate#Generating SSL certificate>> ...<pre>" 
    132         generate_ssl_key 
     89        if [ ! -e "/etc/ssl/matrixtunnel.key" ]; then 
     90                is_package_installed "openssl-util" 
     91                if [ "$?" = "1" ]; then 
     92                        inst_packages="$inst_packages openssl-util" 
     93                        openssl_install="1" 
     94                fi 
     95                is_package_installed "libopenssl" 
     96                if [ "$?" = "1" ]; then 
     97                        inst_packages="$inst_packages libopenssl" 
     98                        libsslsymlink=1 
     99                fi 
     100                is_package_installed "zlib" 
     101                if [ "$?" = "1" ]; then 
     102                        inst_packages="$inst_packages zlib" 
     103                fi 
     104                if [ "$openssl_install" = "1" ]; then 
     105                        ipkg -d ram install "openssl-util" 
     106                fi 
     107                if [ "$libsslsymlink" = "1" ]; then 
     108                        ln -s /tmp/usr/lib/libssl.so.0.9.8 /lib/libssl.so.0.9.8 
     109                        ln -s /tmp/usr/lib/libcrypto.so.0.9.8 /lib/libcrypto.so.0.9.8 
     110                fi 
     111                if [ -z "$(ps -A | grep "[n]tpclient\>")" ] && [ -z "$(ps -A | grep "[n]tpd\>")" ]; then 
     112                        ntpcli=$(which ntpclient) 
     113                        if [ -n "$ntpcli" ]; then 
     114                                $ntpcli -c 1 -s -h pool.ntp.org 
     115                        else 
     116                                rdate -s pool.ntp.org 
     117                        fi 
     118                fi 
     119                export RANDFILE="/tmp/.rnd" 
     120                dd if=/dev/urandom of="$RANDFILE" count=1 bs=512 2>/dev/null 
     121                /tmp/usr/bin/openssl genrsa -out /etc/ssl/matrixtunnel.key 2048; /tmp/usr/bin/openssl req -new -batch -nodes -key /etc/ssl/matrixtunnel.key -out /etc/ssl/matrixtunnel.csr; /tmp/usr/bin/openssl x509 -req -days 365 -in /etc/ssl/matrixtunnel.csr -signkey /etc/ssl/matrixtunnel.key -out /etc/ssl/matrixtunnel.cert 
     122                rm -f "$RANDFILE" 2>/dev/null 
     123                unset RANDFILE 
     124                ipkg install matrixtunnel 
     125                if [ "$libsslsymlink" = "1" ]; then 
     126                        rm /lib/libcrypto.so.0.9.8 
     127                        rm /lib/libssl.so.0.9.8 
     128                fi 
     129                if [ -n "$inst_packages" ]; then 
     130                        ipkg remove "$inst_packages" 
     131                fi 
     132        fi 
    133133        echo "</pre><br />" 
    134134fi 
     
    138138if empty "$FORM_submit"; then 
    139139        # initialize all defaults 
     140        eval CONFIG_system_hostname="\$CONFIG_${hostname_cfg}_hostname" 
     141        FORM_hostname="${CONFIG_system_hostname:-OpenWrt}" 
    140142        eval time_zone_part="\$CONFIG_${timezone_cfg}_posixtz" 
    141143        eval time_zoneinfo_part="\$CONFIG_${timezone_cfg}_zoneinfo" 
     144        #wait for ntpclient to be updated 
     145        #FORM_ntp_server="${ntp_server:-$(nvram get ntp_server)}" 
    142146        time_zone_part="${time_zone_part:-"UTC+0"}" 
    143147        time_zoneinfo_part="${time_zoneinfo_part:-"-"}" 
     
    149153                FORM_wait_time="${wait_time:-$(nvram get wait_time)}" 
    150154                FORM_wait_time="${FORM_wait_time:-1}" 
     155                FORM_clkfreq="${clkfreq:-$(nvram get clkfreq)}"; 
     156                FORM_clkfreq="${FORM_clkfreq:-200}" 
    151157        } 
    152158        # webif settings 
     
    155161        FORM_language="${CONFIG_general_lang:-en}"       
    156162        FORM_theme=${CONFIG_theme_id:-xwrt} 
    157         FORM_ssl_enable="${CONFIG_matrixtunnel_enable:-0}" 
     163        FORM_ssl_enable="${CONFIG_ssl_enable:-0}" 
    158164else 
    159165##################################################################### 
     
    166172                time_zone_part="${FORM_system_timezone#*@}" 
    167173                time_zoneinfo_part="${FORM_system_timezone%@*}" 
    168                 empty "$hostname_cfg" && { 
    169                         uci_add system system 
    170                         hostname_cfg="cfg1" 
    171                 } 
    172174                uci_set "system" "$hostname_cfg" "hostname" "$FORM_hostname" 
    173175                empty "$timezone_cfg" && { 
     
    177179                uci_set timezone "$timezone_cfg" posixtz "$time_zone_part" 
    178180                uci_set timezone "$timezone_cfg" zoneinfo "$time_zoneinfo_part" 
    179                 for server in $ntpservers; do 
    180                         eval FORM_ntp_server="\$FORM_ntp_server_$server" 
    181                         eval FORM_ntp_port="\$FORM_ntp_port_$server" 
    182                         eval FORM_ntp_count="\$FORM_ntp_count_$server" 
    183                         uci_set "$ntpcliconf" "$server" hostname "$FORM_ntp_server" 
    184                         uci_set "$ntpcliconf" "$server" port "$FORM_ntp_port" 
    185                         uci_set "$ntpcliconf" "$server" count "$FORM_ntp_count" 
    186                 done 
     181                #waiting for ntpclient update 
     182                #save_setting system ntp_server "$FORM_ntp_server" 
    187183 
    188184                is_bcm947xx && { 
     
    194190                                save_setting system wait_time "$FORM_wait_time" 
    195191                        } 
     192                        equal "$OVERCLOCKING_DISABLED" "0" && ! empty "$FORM_clkfreq" && 
     193                        { 
     194                                save_setting nvram clkfreq "$FORM_clkfreq" 
     195                        } 
    196196                } 
    197197                # webif settings 
    198                 # fix emptying the field when not present 
    199                 FORM_ssl_enable="${FORM_ssl_enable:-$CONFIG_matrixtunnel_enable}" 
    200                 FORM_ssl_enable="${FORM_ssl_enable:-0}" 
    201                 uci_set "webifssl" "matrixtunnel" "enable" "$FORM_ssl_enable" 
     198                uci_set "webif" "ssl" "enable" "$FORM_ssl_enable" 
    202199                uci_set "webif" "theme" "id" "$FORM_theme" 
    203200                uci_set "webif" "general" "lang" "$FORM_language" 
     
    216213submit|install_stunnel| @TR<<system_settings_Install_MatrixTunnel#Install MatrixTunnel>> |" 
    217214else 
    218         if [ -e /etc/ssl/matrixtunnel.key -a -e /etc/ssl/matrixtunnel.cert ]; then 
    219                 WEBIF_SSL="$WEBIF_SSL 
     215        WEBIF_SSL="$WEBIF_SSL 
    220216select|ssl_enable|$FORM_ssl_enable 
    221217option|0|@TR<<system_settings_webifssl_Off#Off>> 
    222218option|1|@TR<<system_settings_webifssl_On#On>>" 
    223         else 
    224                 WEBIF_SSL="$WEBIF_SSL 
    225 string|<div class=\"warning\">@TR<<system_settings_Feature_requires_certificate#The SSL certificate is missing. You need to generate it for ssl support>>:</div> 
    226 submit|generate_certificate| @TR<<system_settings_Generate_SSL_Certificate#Generate SSL Certificate>> |" 
    227         fi 
    228219fi 
    229220 
     
    238229# 
    239230is_bcm947xx && { 
     231        equal "$OVERCLOCKING_DISABLED" "0" && 
     232        { 
     233        if [ "$CPU_VERSION" = "V0.8" ]; then 
     234                FORM_clkfreqs="$FORM_clkfreq 
     235                        option|184 
     236                        option|188 
     237                        option|197 
     238                        option|200 
     239                        option|207 
     240                        option|216 
     241                        option|217 
     242                        option|225 
     243                        option|234 
     244                        option|238 
     245                        option|240 
     246                        option|250" 
     247                # special case for custom CFEs (like mine) 
     248                if [ $(nvram get clkfreq) -gt 250 ]; then 
     249                        FORM_clkfreqs="$FORM_clkfreqs 
     250                                option|$(nvram get clkfreq)" 
     251                fi 
     252        else 
     253                # BCM3302 v0.7 or other.. 
     254                # in this case, we'll show it, but not have any options 
     255                FORM_clkfreqs="$FORM_clkfreq 
     256                        option|$FORM_clkfreq" 
     257        fi 
     258        } 
     259 
    240260        ##################################################################### 
    241261        # Initialize wait_time form 
     
    282302THEMES=$(echo "$THEMES" | sort -u) 
    283303 
     304dangerous_form_start="" 
     305dangerous_form_end="" 
     306dangerous_form_help="" 
     307 
    284308##################################################################### 
    285309# Initialize LANGUAGES form 
     
    303327        helptext|HelpText wait_time#Number of seconds the boot loader should wait for a TFTP transfer if Boot Wait is on." 
    304328 
    305 
    306  
    307 ##################################################################### 
    308 # ntp form 
    309 for server in $ntpservers; do 
    310         if empty "$FORM_submit"; then 
    311                 config_get FORM_ntp_server $server hostname 
    312                 config_get FORM_ntp_port $server port 
    313                 config_get FORM_ntp_count $server count 
    314         else 
    315                 eval FORM_ntp_server="\$FORM_ntp_server_$server" 
    316                 eval FORM_ntp_port="\$FORM_ntp_port_$server" 
    317                 eval FORM_ntp_count="\$FORM_ntp_count_$server" 
    318         fi 
    319         #add check for blank config, the only time it will be seen is when config section is waitings to be removed 
    320         if [ "$FORM_ntp_port" != "" -o "$FORM_ntp_count" != "" -o "$FORM_ntp_server" != "" ]; then 
    321                 if [ "$FORM_ntp_port" = "" ]; then 
    322                         FORM_ntp_port=123 
    323                 fi 
    324                 if [ "$FORM_ntp_count" = "" ]; then 
    325                         FORM_ntp_count=1 
    326                 fi 
    327                 ntp_form="field|@TR<<NTP Server>> 
    328                 text|ntp_server_$server|$FORM_ntp_server 
    329                 field|@TR<<NTP Server Port>> 
    330                 text|ntp_port_$server|$FORM_ntp_port 
    331                 field|@TR<<NTP Count>> 
    332                 text|ntp_count_$server|$FORM_ntp_count 
    333                 string|<tr><td><a href="$SCRIPT_NAME?remove_ntpcfg=$server">@TR<<Remove NTP Server>></a>" 
    334                 append NTP "$ntp_form" "$N" 
    335         fi 
    336 done 
    337  
    338 add_ntpcfg="string|<tr><td><a href=$SCRIPT_NAME?add_ntpcfg_number=$ntpcfg_number>@TR<<Add NTP Server>></a>" 
    339 append NTP "$add_ntpcfg" "$N" 
    340  
     329        equal "$OVERCLOCKING_DISABLED" "0" && 
     330        { 
     331                clkfreq_form="field|@TR<<CPU Clock Frequency>> 
     332                select|clkfreq|$FORM_clkfreqs" 
     333                dangerous_form_start="start_form|@TR<<Dangerous Settings>>" 
     334                dangerous_form_end="end_form" 
     335                dangerous_form_help="helpitem|CPU Clock Frequency 
     336                                        helptext|HelpText CPU Clock Frequency#Do not change this. You may brick your router if you do not know what you are doing. We've tried to disable it for all routers that can be bricked through an invalid clock frequency setting. Only Linksys WRT54G v4 units are known to be unbrickable by a bad clkfreq setting." 
     337        } 
     338
     339 
     340##################################################################### 
     341# check if ntpclient or opennptd is installed and give user option to install ntpclient if neither are installed. 
    341342if [ -n "$(has_pkgs ntpclient)" -a -n "$(has_pkgs openntpd)" ]; then 
    342343        NTPCLIENT_INSTALL_FORM="string|<div class=\"warning\">@TR<<Warning>>: @TR<<system_settings_feature_requires_ntpclient#No NTP client is installed. For correct time support you need to install one>>:</div> 
     
    425426helpitem|Timezone 
    426427helptext|Timezone_helptext#Set up your time zone according to the nearest city of your region from the predefined list. 
    427 $NTP 
     428field|@TR<<NTP Server>> 
     429text|ntp_server|$FORM_ntp_server 
    428430end_form 
    429431$NTPCLIENT_INSTALL_FORM 
     
    440442$WEBIF_SSL 
    441443end_form 
     444# end webif settings 
     445########################### 
     446$dangerous_form_start 
     447$clkfreq_form 
     448$dangerous_form_help 
     449$dangerous_form_end 
    442450EOF 
    443451 
  • firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/views/info-about.ahtml

    r354 r386  
    2626        <li><a href="mailto:mtsales@users.berlios.de">Mario Sales</a></li> 
    2727        <li><a href="mailto:markus@freewrt.org">Markus Wigge</a></li> 
    28         <li><a href="mailto:liran@enginx.com">Liran Tal</a></li> 
    2928        <li><a href="mailto:o.hardy@mail2web.com">Olivier Hardy (SeDkY)</li> 
    3029        <li><a href="mailto:seitel@users.berlios.de">Stefan Eitel</a></li> 
  • firmware/trunk/kamikaze/package/webif/ipkg/webif.postinst

    r354 r386  
    8080# don't run below on 'real' system 
    8181if [ -n "${IPKG_INSTROOT}" ]; then 
    82         if [ "$revision" = "" ]; then 
     82        if [ "$revision" = "7.06" ]; then 
     83                AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/7.06/$S/packages" 
     84        else 
    8385                AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/$S/packages" 
    84         else 
    85                 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/$S/packages" 
    8686        fi 
    8787fi 
     
    8989# only run below on 'real' system (not image builder) 
    9090if [ -z "${IPKG_INSTROOT}" ]; then 
    91  
    92         grep -q "7.07" "/etc/banner" 
    93         [ $? = 0 ] && { 
    94                 revision="7.07" 
    95         } 
    96  
     91         
    9792        # initialize ipkg.conf 
    9893        uname -a |grep mips |grep 2.4 && cat /proc/cpuinfo |grep Broadcom 
    9994        [ $? = 0 ] && { 
    10095                #Delete incorrect kamikaze repo 
    101                 if [ "$revision" = "7.07" ]; then 
    102                         DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm-2.4/packages" 
    103                 fi 
    104                  
    105                 if [ "$revision" = "" ]; then 
     96                DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/brcm-2.4/packages" 
     97                if [ "$revision" = "7.06" ]; then 
     98                        AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/7.06/brcm-2.4/packages" 
     99                else 
    106100                        AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm-2.4/packages" 
    107                 else 
    108                         AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/brcm-2.4/packages" 
    109101                fi 
    110102        } 
     
    114106                cat /proc/cpuinfo | grep BCM63xx && SYSTYPE="63xx" 
    115107                #Delete incorrect repo 
    116                 if [ "$revision" = "7.07" ]; then 
    117                         DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm${SYSTYPE}-2.6/packages" 
    118                 fi 
     108                DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/brcm${SYSTYPE}-2.6/packages" 
    119109                if [ -n $SYSTYPE ]; then 
    120                         if [ "$revision" = "" ]; then 
     110                        if [ "$revision" = "7.06" ]; then 
     111                                AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/7.06/brcm${SYSTYPE}-2.6/packages" 
     112                        else 
    121113                                AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm${SYSTYPE}-2.6/packages" 
    122                         else 
    123                                 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/brcm${SYSTYPE}-2.6/packages" 
    124114                        fi 
    125115                fi 
     
    129119        [ $? = 0 ] && { 
    130120                #Delete incorrect repo 
    131                 if [ "$revision" = "7.07" ]; then 
    132                        DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/x86-2.6/packages" 
    133                 fi 
    134                 if [ "$revision" = "" ]; then 
     121                DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/x86-2.6/packages" 
     122                if [ "$revision" = "7.06" ]; then 
     123                       AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/7.06/x86-2.6/packages" 
     124                else 
    135125                        AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/x86-2.6/packages" 
    136                 else 
    137                         AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/x86-2.6/packages" 
    138126                fi 
    139127        } 
     
    141129        [ $? = 0 ] && { 
    142130                #Delete incorrect repo 
    143                 if [ "$revision" = "7.07" ]; then 
    144                        DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages" 
    145                 fi 
    146                 if [ "$revision" = "" ]; then 
     131                DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/atheros-2.6/packages" 
     132                if [ "$revision" = "7.06" ]; then 
     133                       AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/7.06/atheros-2.6/packages" 
     134                else 
    147135                        AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages" 
    148                 else 
    149                         AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/atheros-2.6/packages" 
    150                 fi 
    151         } 
    152         uname -a |grep mips |grep 2.6 && cat /proc/cpuinfo |grep WP54 
    153         [ $? = "0" ] && { 
    154                 #Delete incorrect repo 
    155                 if [ "$revision" = "7.07" ]; then 
    156                         DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/adm5120-2.6/packages" 
    157                 fi 
    158                 if [ "$revision" = "" ]; then 
    159                         AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/adm5120-2.6/packages" 
    160                 else 
    161                         AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/adm5120-2.6/packages" 
    162136                fi 
    163137        } 
    164138        cat /proc/cpuinfo |grep "IXP4\?\?" 
    165139        [ $? = "0" ] && { 
    166                 #Delete incorrect repo 
    167                 if [ "$revision" = "7.07" ]; then 
    168                         DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/ixp4xx-2.6/packages" 
    169                 fi 
    170                 if [ "$revision" = "" ]; then 
     140                if [ "$revision" = "7.06" ]; then 
     141                        AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/7.06/ixp4xx-2.6/packages" 
     142                else 
    171143                        AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/ixp4xx-2.6/packages" 
    172                 else 
    173                         AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/ixp4xx-2.6/packages" 
    174144                fi 
    175145        } 
     
    190160        /etc/init.d/webif enable 
    191161        /etc/init.d/custom-user-startup enable 
    192  
    193         # start X-Wrt specific services 
    194         /etc/init.d/syslog enable 
    195         /etc/init.d/timezone enable 
    196162         
    197         ExecuteIfExists "/etc/init.d/timezone" start 
     163        #FIXME: Syslog needs to be double checked 
     164        #/etc/init.d/syslog enable 
     165         
    198166        ExecuteIfExists "/etc/init.d/webif" start 
    199167