Changeset 386
- Timestamp:
- 10/19/07 13:38:04 (2 years ago)
- Files:
-
- firmware/trunk/kamikaze/package/webif/Makefile (modified) (3 diffs)
- firmware/trunk/kamikaze/package/webif/files/bin/klogd (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/bin/syslogd (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/etc/config/dhcp (added)
- firmware/trunk/kamikaze/package/webif/files/etc/config/webif (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/etc/config/webifssl (deleted)
- firmware/trunk/kamikaze/package/webif/files/etc/default (deleted)
- firmware/trunk/kamikaze/package/webif/files/etc/init.d/dnsmasq (added)
- firmware/trunk/kamikaze/package/webif/files/etc/init.d/l2tpns (deleted)
- firmware/trunk/kamikaze/package/webif/files/etc/init.d/syslog (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/etc/init.d/webif (modified) (5 diffs)
- firmware/trunk/kamikaze/package/webif/files/etc/init.d/webifssl (deleted)
- firmware/trunk/kamikaze/package/webif/files/etc/languages.lst (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/apn.csv (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/apply.sh (modified) (9 diffs)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/common.awk (modified) (3 diffs)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/fixed-functions.sh (deleted)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/l2tpns_apply.sh (deleted)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/lang/cs/common.txt (modified) (21 diffs)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/timezones.csv (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/webif.sh (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/.categories (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-aircrack.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-cifs.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-dlmanager.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-hydra.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-ipkg.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-proftpd.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-shell.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications-swap.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/applications.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/config.sh (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/info.awx (modified) (2 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-ddns.sh (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-qos.sh (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-wan-lan.sh (modified) (2 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-wlan.sh (modified) (16 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/reboot.sh (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-basic.sh (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-conntrackread.awx (deleted)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-conntrackread.sh (added)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-diag.sh (modified) (2 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-interfaces.sh (modified) (4 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-processes.sh (modified) (2 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-qos.sh (modified) (4 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-usb.sh (modified) (5 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-ipkg.sh (modified) (2 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-password.sh (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-settings.sh (modified) (15 diffs)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/views/info-about.ahtml (modified) (1 diff)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/views/status-conntrackread.ahtml (deleted)
- firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/vpn-l2tpns.sh (deleted)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.1.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.10.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.11.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.12.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.14.gif (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.2.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.3.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.4.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.5.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.6.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.7.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.8.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app.9.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/app13.jpg (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/arrwd.gif (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/arrwu.gif (added)
- firmware/trunk/kamikaze/package/webif/files/www/images/dvsts.jpg (added)
- firmware/trunk/kamikaze/package/webif/ipkg/webif.postinst (modified) (6 diffs)
- firmware/trunk/kamikaze/package/webif/storage/dhcp (deleted)
- firmware/trunk/kamikaze/package/webif/storage/dnsmasq (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
firmware/trunk/kamikaze/package/webif/Makefile
r354 r386 3 3 PKG_NAME:=webif 4 4 PKG_VERSION:=0.3 5 PKG_RELEASE:= 65 PKG_RELEASE:=5 6 6 7 7 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) … … 150 150 $(TARGET_CC) $(TARGET_CFLAGS) \ 151 151 -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 \ 153 153 $(TARGET_CFLAGS_EXTRA) \ 154 154 $(TARGET_LDFLAGS) \ … … 171 171 rm -rf $(1)/www/themes/sedky1/ 172 172 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 fi176 173 ./embed_rev.sh $(1)/www/.version \ 177 174 $(1)/usr/lib/webif/webif.sh \ firmware/trunk/kamikaze/package/webif/files/bin/klogd
r354 r386 1 1 #!/bin/sh 2 2 #â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")" ]; then3 if [ -n "$(ps | grep [k]logd)" ]; then 4 4 echo "klogd has already been started." 5 5 else firmware/trunk/kamikaze/package/webif/files/bin/syslogd
r354 r386 1 1 #!/bin/sh 2 2 #â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")" ]; then3 if [ -n "$(ps | grep [s]yslogd)" ]; then 4 4 echo "syslogd has already been started." 5 5 else firmware/trunk/kamikaze/package/webif/files/etc/config/webif
r354 r386 15 15 config webif misc 16 16 option opendns "0" 17 17 18 config webif ssl 19 option enable '0' 20 18 21 config 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 31 31 [ "$IPCALC_CMD" == "" ] && IPCALC_CMD=$(which ipcalc 2>/dev/null) 32 32 [ "$IPCALC_CMD" != "" ] && { 33 eval $($IPCALC_CMD "$ipaddr")33 $IPCALC_CMD "$ipaddr" 34 34 [ "$ipaddr" != "$IP" ] && ipaddr="" 35 35 } firmware/trunk/kamikaze/package/webif/files/etc/init.d/webif
r354 r386 29 29 30 30 start() { 31 . /etc/functions.sh 31 32 . /lib/config/uci.sh 32 33 . /usr/lib/webif/functions.sh … … 37 38 38 39 [ -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:**:**:** 41 52 [ $? = "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 57 60 } 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" 68 62 [ $? = "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 94 65 } 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 96 78 done 97 if [ -z "$CONFIG_general_firmware_version" - o-z "$CONFIG_general_firmware_name" ]; then79 if [ -z "$CONFIG_general_firmware_version" -a -z "$CONFIG_general_firmware_name" ]; then 98 80 #detect firmware info 99 81 firmware_name=$CONFIG_general_firmware_name … … 104 86 firmware_name="OpenWrt Kamikaze" 105 87 else 106 firmware_name=" Unknown Wrt"88 firmware_name="OpenWrt White Russian" 107 89 fi 108 90 firmware_subtitle="With X-Wrt Extensions" … … 110 92 if [ -f "/etc/openwrt_version" ]; then 111 93 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" 112 98 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) 114 100 else 115 101 firmware_version="unknown" … … 136 122 } 137 123 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 138 149 if [ -e "/tmp/.uci/webif" ]; then 139 150 uci_commit "webif" firmware/trunk/kamikaze/package/webif/files/etc/languages.lst
r354 r386 9 9 option|hr|Croatian 10 10 option|hu|Hungarian 11 option|it| Italian11 option|it|wItalian 12 12 option|nl|Dutch 13 13 option|no|Norwegian firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/apn.csv
r354 r386 29 29 is:OG Vodafone:gprs.is:: 30 30 lu:LUXGSM:web.pt.lu:: 31 it:3 Italy:naviga.tre.it::firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/apply.sh
r354 r386 19 19 timezone_cfg="$CONFIG_SECTION" 20 20 ;; 21 ntp_client)22 config_get hostname $CONFIG_SECTION hostname23 config_get port $CONFIG_SECTION port24 config_get count $CONFIG_SECTION count25 26 [ "$DONE" = "1" ] && exit 027 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=130 }31 }32 ;;33 system)34 config_get hostname $CONFIG_SECTION hostname35 echo "${hostname:-OpenWrt}" > /proc/sys/kernel/hostname36 ;;37 21 esac 38 22 } … … 41 25 hosts) rm -f /etc/hosts; mv $config /etc/hosts; killall -HUP dnsmasq ;; 42 26 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;; 44 28 dnsmasq.conf) mv /tmp/.webif/file-dnsmasq.conf /etc/dnsmasq.conf && /etc/init.d/dnsmasq restart;; 45 29 ' … … 116 100 } 117 101 118 reload_upnpd() {119 config_load upnpd120 config_get_bool test config enabled 0121 if [ 1 -eq "$test" ]; then122 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 else132 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 fi142 config_clear config143 }144 145 102 # switch_language (old_lang) - switches language if changed 146 103 switch_language() { … … 186 143 unset CONFIG_orig_SECTION 187 144 } 188 189 # config-* simple config files190 (191 cd /proc/self192 cat /tmp/.webif/config-* 2>&- | grep '=' >&- 2>&- && {193 exists "/usr/sbin/nvram" && {194 cat /tmp/.webif/config-* 2>&- | tee fd/1 | xargs -n1 nvram set195 echo "@TR<<Committing>> NVRAM ..."196 nvram commit197 }198 }199 )200 145 201 146 # … … 223 168 ;; 224 169 "/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 226 194 ;; 227 195 "/tmp/.uci/network") … … 232 200 /etc/init.d/dnsmasq start 233 201 fi 234 ;;235 "/tmp/.uci/ntp_client")236 killall ntpclient237 config_load ntp_client&238 202 ;; 239 203 "/tmp/.uci/dhcp") … … 252 216 /etc/init.d/openvpn start ;; 253 217 "/tmp/.uci/system") 254 config_load system;;218 /etc/init.d/boot start ;; 255 219 "/tmp/.uci/snmp") 256 220 echo '@TR<<Exporting>> @TR<<snmp settings>> ...' … … 265 229 /etc/init.d/S??snmpd restart >&- 2>&- 266 230 ;; 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 ;;276 231 "/tmp/.uci/updatedd") 277 232 uci_load "updatedd" … … 287 242 "/tmp/.uci/timezone") 288 243 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 308 253 ;; 309 254 esac firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/common.awk
r354 r386 2 2 function config_load(package, var) { 3 3 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" $07 next8 }9 var=substr($0, 1, RSTART-1)10 CONFIG[var] = substr($0, RSTART+1, length($0) - RSTART)11 }12 }13 14 # parameters: 115 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) {17 4 sub("^CONFIG_", "") 18 5 if (match($0, "=") == 0) { … … 228 215 print "<h3><strong>@TR<<Subcategories>>:</strong></h3>" 229 216 print "<ul>" 230 while (("grep -H '^##WEBIF:name:"CATEGORY":' "cgidir"/*.awx "cgidir"/*.sh 2>/dev/null | sed -e 's,^.*/\\([a-zA-Z 0-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) { 231 218 print_subcategory() 232 219 } … … 276 263 counter++ 277 264 } 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) { 279 266 counter++ 280 267 } firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/lang/cs/common.txt
r354 r386 4 4 5 5 ## SVN version referenced 6 lang_for_svn => 3572 6 lang_for_svn => 3299 7 7 8 ## /usr/lib/webif/apn.csv 8 9 Vodafone UK => Vodafone VB … … 52 53 Error installing language pack => Chyba pÅi instalaci jazykového balÃÄku 53 54 Committing => Ukládám 54 Starting => Startuji55 upnpd => upnpd56 Stopping => Zastavuji57 55 Reloading => Obnovuji 58 56 network => sÃÅ¥ová nastavenà … … 60 58 syslogd => syslogd 61 59 OpenVPN => OpenVPN 62 Exporting => Exportuji63 snmp settings => nastavenà snmp64 TZ setting => nastavenà TZ65 60 66 61 ## /usr/lib/webif/browser.awk … … 105 100 106 101 ## /usr/lib/webif/editor.awk 107 editor_File => Soubor102 File => Soubor 108 103 Save Changes => UloÅŸit zmÄny 109 104 Back => ZpÄt … … 136 131 Invalid dots => Neplatné teÄky 137 132 Invalid spaces => Neplatné mezery 138 Missing netmask => ChybÄjÃcà sÃÅ¥ová maska139 Netmask not allowed => SÃÅ¥ová maska nenà pÅÃpustná140 133 Error in => Chyba v poloÅŸce 141 134 … … 149 142 Settings saved => Nastavenà byla uloÅŸena 150 143 Settings not saved => Nastavenà nebyla uloÅŸena 151 Password_mismatch => Zadaná hesla nejsou stejná!152 144 Warning => 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').145 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'). 154 146 New Password => Nové heslo 155 147 Confirm Password => Potvrdit heslo 156 148 Set => Nastavit 149 150 ## /www/cgi-bin/webif/applications.sh 151 Applications => Aplikace 152 Applications => Aplikace 153 List => Seznam 154 List of Applications => Seznam aplikacà 155 ## TODO 157 156 158 157 ## /www/cgi-bin/webif/.categories … … 164 163 Network => SÃÅ¥ 165 164 VPN => VPN 165 Applications => Aplikace 166 166 Logout => Odhlášenà 167 167 … … 184 184 ## temporarily removed #### duplicate ##graphs_svg_required => Tento objekt vyÅŸaduje podporu SVG. 185 185 186 ## /www/cgi-bin/webif/iframe.mini-info.sh 187 Device Status => Stav zaÅÃzenà 188 ## rest is untranslated 189 186 190 ## /www/cgi-bin/webif/info.awx 187 Please wait => PoÄkejte prosÃm 191 Info => Info 188 192 info_wait_install => PoÄkejte prosÃm, instalace můşe chvilku trvat 189 193 System Information => Systémové informace 190 194 About => O aplikaci 191 Info => Info192 System => Systém193 195 194 196 ## /www/cgi-bin/webif/log-browse.sh … … 210 212 Dest. Port => CÃl. port 211 213 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 217 215 Log => Záznam 218 216 Kernel => Jádro 217 log_dmesg_Kernel_Ring_Buffer => KruhovÜ záznam jádra 218 HelpText Browser_Frames => Váš prohlÃÅŸeÄ nepodporuje rámce,<br />pokraÄujte tÃmto odkazem 219 log_dmesg_View_Kernel_Ring_Buffer=> Zobrazit kruhovÜ záznam jádra 219 220 220 221 ## /www/cgi-bin/webif/logout.sh … … 224 225 logout_reference => Odkaz k nahlédnutÃ, viz http://httpd.apache.org/docs/1.3/howto/auth.html 225 226 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 228 Syslog Messages => Zprávy syslogu 229 230 ## /www/cgi-bin/webif/log-read.sh 229 231 Log => Záznam 230 232 Syslog => Syslog 231 232 ## /www/cgi-bin/webif/log-setup.awx 233 Syslog View => Zobrazenà záznamu syslog 234 Message Prefix => PÅedpona zpráv 235 HelpText Browser_Frames => Váš prohlÃÅŸeÄ nepodporuje rámce,<br />pokraÄujte tÃmto odkazem 236 View Syslog => Zobrazit syslog 237 238 ## /www/cgi-bin/webif/log-setup.sh 233 239 Remote host => VzdálenÜ poÄÃtaÄ 234 240 Remote Port => VzdálenÜ port 235 241 Minutes Between Marks => Minut mezi znaÄkami 236 242 Log Size => Velikost záznamu 237 ##duplicate Settings saved238 ##duplicate Settings not saved239 syslog Settings => Nastavenà pro syslog240 243 Log => Záznam 241 244 Syslog Settings => Nastavenà pro syslogd 245 syslog Settings => Nastavenà pro syslog 246 Remote Syslog => VzdálenÜ syslog 247 Server 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 250 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. 251 Server Port => Port serveru 252 Syslog Marks => ZnaÄky v syslogu 253 Minutes 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. 256 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. 257 Local Log => MÃstnà záznam 258 Log type => Typ záznamu 259 Circular => KruhovÜ 260 File => 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. 263 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. 264 Log 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. 267 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. 268 Log 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. 271 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ÄÅ¥. 242 272 243 273 ## /www/cgi-bin/webif/network-firewall.sh … … 439 469 qos_adv_disabled => Zakázáno 440 470 Advanced => 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&edit=qos">ruÄnÄ upravit konfiguraci</a >.471 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&edit=qos">ruÄnÄ upravit konfiguraci</a 442 472 QoS Traffic Classification Rules => KlasifikaÄnà pravidla provozu QoS 443 473 Group => Skupina … … 559 589 wol_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. 560 590 561 ## /www/cgi-bin/webif/status-basic.sh562 Status => Stav563 System => Systém564 Device Status => Stav zaÅÃzenÃ565 Swap => OdkládacÃ566 KiB => KiB567 Used => VyuÅŸito568 mount_of => z569 status_basic_swap_partition => odkládacà oblast570 status_basic_swap_file => odkládacà soubor571 #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à RAM575 Total => Celkem576 Used => VyuÅŸito577 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 => Maximum581 Used => VyuÅŸito582 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 586 591 ## /www/cgi-bin/webif/status-connection.sh 587 592 Status => Stav … … 591 596 Router Listening Ports => Router naslouchá na portech 592 597 Router Connections => Spojenà na router 593 594 ## /www/cgi-bin/webif/status-conntrackread.awx595 Conntrack Table => Tabulka conntrack596 status_conntrackread_no_messages => Neexistujà şádné záznamy sledovánà spojenÃ.597 Status => Stav598 Conntrack => Conntrack599 598 600 599 ## /www/cgi-bin/webif/status-diag.sh … … 606 605 TraceRoute => TraceRoute 607 606 Please wait for output of => PoÄkejte prosÃm na vÜstup z 608 609 ## /www/cgi-bin/webif/status-interfaces.sh610 Status => Stav611 Interfaces => RozhranÃ612 DNS Server => Server DNS613 DNS Servers => Servery DNS614 WAN => WAN615 LAN => LAN616 MAC Address => Adresa MAC617 IP Address => Adresa IP618 Received => PÅijato619 Transmitted => Odesláno620 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 => WLAN625 Access Point => PÅÃstupovÜ bod626 Mode => ReÅŸim627 ESSID => ESSID628 Frequency => Frekvence629 GHz => GHz630 Transmit Power => VysÃlacà vÜkon631 Noise Level => ÃroveÅ Å¡umu632 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é informace641 Show raw statistics => Zobrazit surovou statistiku 642 Interfaces Status WAN => Stav rozhranà WAN643 Interfaces Status LAN => Stav rozhranà LAN644 Interfaces Status Other => Stav rozhranÃ645 Interfaces Status WLAN nr => Stav bezdrátového rozhranÃ646 607 647 608 ## /www/cgi-bin/webif/status-iptables.sh … … 806 767 system_editor_info_file_deleted => Soubor byl smazán úspÄÅ¡nÄ 807 768 808 ## /www/cgi-bin/webif/system-password.sh809 Password => Heslo810 Passwords do not match => Hesla nejsou stejná811 System => Systém812 Password Change => ZmÄna hesla813 New Password => Nové heslo814 Confirm Password => Potvrdit heslo815 816 769 ## /www/cgi-bin/webif/system-settings.sh 817 770 System => Systém … … 819 772 System Settings => Systémová nastavenà 820 773 system_settings_Installing_NTPCLIENT_package => Instaluji balÃÄek NTPCLIENT 821 system_settings_Updating_time => Aktualizuji Äas822 774 system_settings_Installing_MatrixTunnel_package => Instaluji balÃÄek MatrixTunnel 823 system_settings_Generating_SSL_certificate => Generuji SSL certifikát824 Host Name => Název poÄÃtaÄe825 Warning => VarovánÃ826 system_settings_Hostname_failed_validation => Název poÄÃtaÄe nenà platnÜ. Nelze uloÅŸit.827 775 system_settings_Webif_SSL => Webif² pÅes SSL 828 776 system_settings_Feature_requires_matrixtunnel => BalÃÄek MatrixTunnel nenà nainstalován. Je tÅeba jej nainstalovat pro podporu SSL … … 830 778 system_settings_webifssl_Off => Vypnuto 831 779 system_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 780 Host Name => Název poÄÃtaÄe 781 Warning => Varovánà 782 system_settings_Hostname_failed_validation => Název poÄÃtaÄe nenà platnÜ. Nelze uloÅŸit. 834 783 Enable visual effects => Povolit vizuálnà efekty 835 784 Boot Wait => Boot Wait … … 839 788 Wait Time => Äas Äekánà 840 789 HelpText 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 790 CPU Clock Frequency => Frekvence hodin CPU 791 Dangerous Settings => NebezpeÄná nastavenà 792 HelpText 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. 846 793 system_settings_feature_requires_ntpclient => Nenà nainstalován klient NTP. Pro správnÜ Äas je tÅeba jednoho nainstalovat 847 794 system_settings_Install_NTP_Client => Nainstalovat klienta NTP … … 849 796 system_settings_group_unknown_TZ => Neznámá 850 797 system_settings_User_or_old_TZ => UÅŸivatelem definovaná (nebo zastaralá) 798 System Settings => Systémová nastavenà 851 799 Time Settings => Nastavenà Äasu 852 800 Timezone => Äasová zóna … … 854 802 system_settings_js_required => Tato poloÅŸka vyÅŸaduje podporu JavaScriptu. 855 803 Timezone_helptext => Nastavte vaÅ¡i Äasovou zónu podle nejbliÅŸÅ¡Ãho mÄsta vaÅ¡eho regionu z pÅeddefinovaného seznamu. 804 NTP Server => Server NTP 856 805 Webif² Settings => Nastavenà pro Webif² 857 806 Language => Jazyk … … 909 858 info_upgrade_webif => Aktualizovat/PÅeinstalovat Webif² 910 859 info_check_daily_text => Zahrnout dennà sestavenà pÅi kontrole aktualizace pro webif² 911 912 ## /www/cgi-bin/webif/views/log-dmesg.ahtml913 log_dmesg_Current_messages => Aktuálnà záznamy914 log_filter_filtered => filtrováno915 log_dmesg_Boot_time_messages => Záznamy po startu916 log_filter_Text_Filter => TextovÜ filtr917 log_filter_Text_to_Filter => FiltrovanÜ text918 log_filter_Filter_Mode => ReÅŸim filtru919 log_filter_Include => Zahrnout920 log_filter_Exclude => VylouÄit921 log_filter_Remove_Filter => Odstranit filtr922 log_filter_Filter_Messages => Filtrovat záznamy923 ##duplicate Short help924 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|.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.ahtml928 log_read_Syslog_Messages => Záznamy syslogu929 # the rest is duplicated in log-dmesg.ahtml930 931 ## /www/cgi-bin/webif/views/log-setup.ahtml932 Remote Syslog => VzdálenÜ syslog933 Server IP Address => Adresa IP serveru934 Server Port => Port serveru935 ##duplicate Short help936 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 syslogu938 Minutes Between Marks => Minut mezi znaÄkami939 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áznam941 Log type => Typ záznamu942 Circular => KruhovÜ943 File => Soubor944 Log File => Soubor záznamu945 Log Size => Velikost záznamu946 KiB => KiB947 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.ahtml952 ##duplicate text filter texts953 conntrackread_filter_Filter_Records => Filtrovat záznamy954 ##duplicate Short help955 Kernel Connection Tracking Table => Tabulka sledovánà spojenà jádra956 860 957 861 ## /www/svggraph/graph_cpu.svg firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/timezones.csv
r354 r386 1 1 #timezone group timezone cities timezone config string zoneinfo 2 # revision: 2007f2 #lubek@users.berlios.de 20070321 - updated to 2007d, zoneinfo added: 3 3 # it is not exact for the "cities list" but it enables to remember 4 4 # the selection and to synchronize TZs with the standard zoneinfo firmware/trunk/kamikaze/package/webif/files/usr/lib/webif/webif.sh
r354 r386 136 136 137 137 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 152 148 } 153 149 equal "$_nopasswd" 1 && { firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/.categories
r354 r386 7 7 ##WEBIF:category:Network 8 8 ##WEBIF:category:VPN 9 ##WEBIF:category:Applications 9 10 ##WEBIF:category:- 10 11 ##WEBIF:category:Logout firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/config.sh
r354 r386 33 33 } 34 34 done 35 for configname in $(ls /tmp/.uci/* 2>&- | grep -v "\\.lock\$" 2>&-); do35 for configname in $(ls /tmp/.uci/* 2>&-); do 36 36 echo -n "<h3>${configname#/tmp/.uci/}</h3><br /><pre>" 37 37 cat $configname firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/info.awx
r354 r386 78 78 if (machinfo ~ /mips/) { 79 79 if (boardtype ~ /Atheros/) repo = "atheros-2.6" 80 else if (boardtype ~ /WP54/) repo = "adm5120-2.6"81 80 else if (machinfo ~ /2\.4/) repo = "brcm-2.4" 82 81 else if (machinfo ~ /2\.6/) repo = "brcm-2.6" … … 87 86 } 88 87 revision = config_get("general", "firmware_version") 89 if (revision !~ /r/) {88 if (revision == "7.06") { 90 89 version_url = "http://downloads.x-wrt.org/xwrt/kamikaze/" revision "/" repo; 91 90 } else { firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-ddns.sh
r354 r386 23 23 24 24 #define supported services 25 services="changeip dyndns eurodyndns ovh noip ods hn regfish tzo zoneedit"25 services="changeip dyndns eurodyndns ovh noip ods hn regfish tzo" 26 26 27 27 #generate fields for supported services firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-qos.sh
r354 r386 253 253 option|0|@TR<<qos_adv_disabled#Disabled>> 254 254 helpitem|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&edit=qos">manually edit the config</a> .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&edit=qos">manually edit the config</a> 256 256 end_form 257 257 EOF firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-wan-lan.sh
r354 r386 72 72 73 73 # 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" 76 76 77 77 # umts apn … … 188 188 text|pptp_server_ip|$FORM_pptp_server_ip" 189 189 } 190 [ - e"/lib/network/pppoe.sh" ] && {190 [ -x "/lib/network/pppoe.sh" ] && { 191 191 PPPOE_OPTION="option|pppoe|@TR<<PPPoE>>" 192 192 } 193 [ - e"/lib/network/pppoa.sh" ] && {193 [ -x "/lib/network/pppoa.sh" ] && { 194 194 PPPOA_OPTION="option|pppoa|@TR<<PPPoA>>" 195 195 } 196 196 197 [ - e "/lib/network/3g.sh"] && {197 [ -x /sbin/ifup.wwan ] && { 198 198 WWAN_OPTION="option|wwan|@TR<<UMTS/GPRS>>" 199 199 WWAN_COUNTRY_LIST=$( firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/network-wlan.sh
r370 r386 26 26 validate_wireless() { 27 27 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 ;; 28 35 0:0:?) 29 36 if [ "$ap_count" -gt "4" ]; then … … 43 50 append validate_error "string|<h3>@TR<<Error: Only 4 virtual adapters are allowed in ap mode.>></h3><br />" 44 51 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 />" 45 57 fi 46 58 ;; … … 105 117 for iface in $NETWORK_DEVICES; do 106 118 network_options="$network_options 107 option|$iface| $iface"119 option|$iface|@TR<<$iface>>" 108 120 done 109 121 110 122 ##################################################################### 111 # install wpa packages if needed 112 # 113 123 # generate nas package field 124 # 114 125 if ! empty "$FORM_install_nas"; then 115 126 echo "Installing NAS package ...<pre>" … … 117 128 echo "</pre>" 118 129 fi 119 if ! empty "$FORM_install_hostapd_mini"; then120 echo "Installing HostAPD mini package ...<pre>"121 install_package "hostapd-mini"122 echo "</pre>"123 fi124 130 if ! empty "$FORM_install_hostapd"; then 125 hostapd_mini_installed="0"126 is_package_installed hostapd-mini127 equal "$?" "0" && ipkg remove "hostapd-mini"128 131 echo "Installing HostAPD package ...<pre>" 129 132 install_package "hostapd" … … 135 138 echo "</pre>" 136 139 fi 137 138 140 nas_installed="0" 139 141 is_package_installed nas … … 143 145 is_package_installed hostapd 144 146 equal "$?" "0" && hostapd_installed="1" 145 146 hostapd_mini_installed="0"147 is_package_installed hostapd-mini148 equal "$?" "0" && hostapd_mini_installed="1"149 147 150 148 wpa_supplicant_installed="0" … … 163 161 config_get FORM_maxassoc $device maxassoc 164 162 config_get FORM_distance $device distance 163 config_get FORM_diversity $device diversity 165 164 config_get FORM_txantenna $device txantenna 166 165 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 169 167 else 170 168 config_get country $device country … … 180 178 eval FORM_disabled="\$FORM_disabled_$device" 181 179 fi 182 183 append forms "start_form|@TR<<Wireless Adapter>> $device @TR<< Configuration>>" "$N"184 if [ "$iftype" = "broadcom" ]; then185 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" 186 184 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" 187 185 elif [ "$iftype" = "atheros" ]; then 188 append forms "helpitem|Atheros Wireless Configuration" "$N"186 append forms "helpitem|Atheros Wireless Configuration" "$N" 189 187 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" 190 188 fi 191 189 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 209 197 mode_fields="field|@TR<<Mode>> 210 198 select|mode_ap_$device|$FORM_ap_mode" … … 225 213 option|11a|@TR<<802.11A>>" 226 214 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 253 243 append forms "$BG_CHANNELS" "$N" 244 append forms "$A_CHANNELS" "$N" 254 245 255 246 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" 261 253 append forms "helptext|Helptext Diversity#Used on systems with multiple antennas to help improve reception. Disable if you only have one antenna." "$N" 262 254 append forms "helplink|http://madwifi.org/wiki/UserDocs/AntennaDiversity" "$N" 263 255 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 278 272 #Currently broadcom only. 279 273 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" 282 276 append forms "$maxassoc" "$N" 283 277 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" 287 281 288 282 append forms "$distance" "$N" 289 283 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" 291 285 292 286 add_vcfg="string|<tr><td><a href=$SCRIPT_NAME?add_vcfg=$device&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" 295 289 296 290 ##################################################################### 297 291 # This is looped for every virtual wireless interface (wifi-iface) 298 292 # 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 320 318 config_get FORM_rts $vcfg rts 321 config_get_bool FORM_hidden $vcfg hidden322 config_get_bool FORM_isolate $vcfg isolate323 config_get_bool FORM_bgscan $vcfg bgscan324 319 else 325 320 eval FORM_key="\$FORM_radius_key_$vcfg" … … 374 369 375 370 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>>" 378 374 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 393 376 if [ "$iftype" = "atheros" ]; then 394 377 eval txpowers="\$CONFIG_wireless_${device}_txpower" 395 [ -z "$txpowers" ] && {396 txpower=""397 for athname in $(ls /proc/sys/net/ 2>/dev/null | grep "^ath"); do398 [ "$(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); do400 txpower="$txpower $power"401 done402 break403 }404 done405 [ "$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); do408 txpower="$txpower $power"409 done410 wlanconfig "$athname" destroy411 }412 [ "$txpower" != "" ] && {413 txpowers="$txpower"414 config_set wireless "${device}_txpower" "$txpower"415 uci_set webif wireless "${device}_txpower" "$txpower"416 }417 }418 378 if [ "$txpowers" = "" ]; then 419 379 txpowers='1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16' … … 426 386 done 427 387 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 429 398 rts="field|@TR<<RTS (Default off)>> 430 399 text|rts_$vcfg|$FORM_rts" … … 436 405 fi 437 406 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 439 414 text|ssid_$vcfg|$FORM_ssid" 440 415 append forms "$ssid" "$N" 441 416 442 417 bssid="field|@TR<<BSSID>>|bssid_form_$vcfg|hidden 443 418 text|bssid_$vcfg|$FORM_bssid" … … 553 528 append forms "$install_nas_button" "$N" 554 529 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 566 532 install_hostapd_button="$install_hostapd_button 567 533 string|<div class=\"warning\">WPA and WPA2 will not work until you install the HostAPD package. </div> … … 618 584 } 619 585 } 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')); 621 587 set_visible('bgchannelform_$device', v); 622 588 v = (isset('mode_ap_$device','11a')); 623 589 set_visible('achannelform_$device', v); 624 590 v = (!isset('mode_$vcfg','wds')); 591 set_visible('ssid_form_$vcfg', v); 625 592 set_visible('broadcast_form_$vcfg', v); 626 593 v = (isset('mode_$vcfg','wds')); … … 634 601 v = (('$iftype'=='broadcom') && (isset('encryption_$vcfg','psk')) && (isset('encryption_$vcfg','psk2') || isset('encryption_$vcfg','wpa') || isset('encryption_$vcfg','wpa2'))); 635 602 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'))); 639 604 set_visible('install_hostapd_$vcfg', v); 640 605 v = (('$iftype'=='atheros') && (isset('mode_$vcfg','sta')) && (isset('encryption_$vcfg','psk') || isset('encryption_$vcfg','psk2') || isset('encryption_$vcfg','wpa') || isset('encryption_$vcfg','wpa2'))); … … 729 694 uci_set "wireless" "$vcfg" "network" "$FORM_network" 730 695 uci_set "wireless" "$vcfg" "ssid" "$FORM_ssid" 731 FORM_bssid="`echo "$FORM_bssid" |tr "[A-Z]" "[a-z]"`"732 696 uci_set "wireless" "$vcfg" "bssid" "$FORM_bssid" 733 697 uci_set "wireless" "$vcfg" "mode" "$FORM_mode" firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/reboot.sh
r354 r386 9 9 uci_load "network" 10 10 router_ip="$CONFIG_lan_ipaddr" 11 [ -n "$SERVER_PORT" ] && [ "$SERVER_PORT" != "80" ] && router_ip="$router_ip:$SERVER_PORT"12 11 header_inject_head="<meta http-equiv=\"refresh\" content=\"$timeout;http://$router_ip\" />" 13 12 reboot_msg="@TR<<Rebooting now>>... firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-basic.sh
r354 r386 103 103 progressbar|conntrackuse|@TR<<Used>>: $ACTIVE_CONNECTIONS ($USED_CONNECTIONS_PERCENT%)|200|$USED_CONNECTIONS_PERCENT|$USED_CONNECTIONS_PERCENT%|| 104 104 helpitem|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>.105 helptext|Helptext Tracked Connections#This is the number of connections in your router's conntrack table. <a href="status-conntrackread.sh">View Conntrack Table</a> 106 106 end_form| 107 107 firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-diag.sh
r354 r386 4 4 ################################################################### 5 5 # 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. 6 9 # 7 10 # Description: … … 74 77 ps_search=$(echo "$diag_command" | cut -c 1-15) # todo: limitation, X char match resolution 75 78 ps_results=$(ps | grep "$ps_search" | grep -v "grep") 76 _pid=$(echo $ps_results | cut -d ' ' -f 1 | sed 2,99d) # older busybox77 79 equal $_pid "0" && _pid=$(echo $ps_results | cut -d ' ' -f 1 | sed 2,99d) # newer busybox 78 80 output_snapshot_file() { firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-interfaces.sh
r354 r386 2 2 <? 3 3 . /usr/lib/webif/webif.sh 4 4 uci_load network 5 5 header "Status" "Interfaces" "@TR<<Interfaces>>" 6 6 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 8 wan_config=$(ifconfig 2>&1 | grep -A 6 "$CONFIG_wan_ifname[[:space:]]") 9 if [ -n "$wan_config" ]; then 10 wan_ip_addr=$(echo "$wan_config" | grep "inet addr" | cut -d: -f 2 | sed s/Bcast//g) 11 wan_mac_addr=$(echo "$wan_config" | grep "HWaddr" | cut -d'H' -f 2 | cut -d' ' -f 2) 12 wan_tx_packets=$(echo "$wan_config" | grep "TX packets" | sed s/'TX packets:'//g | cut -d' ' -f 11 | int2human) 13 wan_rx_packets=$(echo "$wan_config" | grep "RX packets" | sed s/'RX packets:'//g | cut -d' ' -f 11 | int2human) 14 wan_tx_bytes=$(echo "$wan_config" | grep "TX bytes" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 3) 15 wan_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) 16 fi 17 # get LAN stats 18 lan_config=$(ifconfig 2>&1 | grep -A 6 "$CONFIG_lan_ifname[[:space:]]") 19 if [ "$(uci get network.lan.type)" = "bridge" ]; then 20 lan_ip_addr=$(ifconfig br-lan 2>&1 | grep "inet addr" | cut -d: -f 2 | sed s/Bcast//g) 21 else 22 lan_ip_addr=$(echo "$lan_config" | grep "inet addr" | cut -d: -f 2 | sed s/Bcast//g) 23 fi 24 lan_mac_addr=$(echo "$lan_config" | grep "HWaddr" | cut -d'H' -f 2 | cut -d' ' -f 2) 25 lan_tx_packets=$(echo "$lan_config" | grep "TX packets" | sed s/'TX packets:'//g | cut -d' ' -f 11 | int2human) 26 lan_rx_packets=$(echo "$lan_config" | grep "RX packets" | sed s/'RX packets:'//g | cut -d' ' -f 11 | int2human) 27 lan_tx_bytes=$(echo "$lan_config" | grep "TX bytes" | sed s/'TX bytes:'//g | sed s/'RX bytes:'//g | cut -d'(' -f 3) 28 lan_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 30 wlan_config=$(iwconfig 2>&1 | grep -v 'no wireless' | grep '\w') 31 wlan_ssid=$(echo "$wlan_config" | grep 'ESSID' | cut -d':' -f 2 | cut -d' ' -f 1 | sed s/'"'//g) 32 wlan_mode=$(echo "$wlan_config" | grep "Mode:" | cut -d':' -f 2 | cut -d' ' -f 1) 33 wlan_freq=$(echo "$wlan_config" | grep "Mode:" | cut -d':' -f 3 | cut -d' ' -f 1) 34 wlan_ap=$(echo "$wlan_config" | grep "Mode:" | cut -d' ' -f 18) 35 wlan_txpwr=$(echo "$wlan_config" | grep Tx-Power | cut -d'-' -f2 | cut -d':' -f 2 | cut -d' ' -f 1 | sed s/"dBm"//g) 36 wlan_key=$(echo "$wlan_config" | grep "Encryption key:" | sed s/"Encryption key:"//) 37 wlan_tx_retries=$(echo "$wlan_config" | grep "Tx excessive retries" | cut -d':' -f 2 | cut -d' ' -f 1) 38 wlan_tx_invalid=$(echo "$wlan_config" | grep "Tx excessive retries" | cut -d':' -f 3 | cut -d' ' -f 1) 39 wlan_tx_missed=$(echo "$wlan_config" | grep "Missed beacon" | cut -d':' -f 4 | cut -d' ' -f 1) 40 wlan_rx_invalid_nwid=$(echo "$wlan_config" | grep "Rx invalid nwid:" | cut -d':' -f 2 | cut -d' ' -f 1) 41 wlan_rx_invalid_crypt=$(echo "$wlan_config" | grep "Rx invalid nwid:" | cut -d':' -f 3 | cut -d' ' -f 1) 42 wlan_rx_invalid_frag=$(echo "$wlan_config" | grep "Rx invalid nwid:" | cut -d':' -f 4 | cut -d' ' -f 1) 43 wlan_noise=$(echo "$wlan_config" | grep "Link Noise level:" | cut -d':' -f 2 | cut -d' ' -f 1) 44 #Find noise for atheros cards 45 if [ -z "$wlan_noise" ]; then 46 wlan_noise=$(echo "$wlan_config" | grep "Noise level" | cut -d'=' -f 4 | cut -d' ' -f 1) 47 fi 26 48 27 config_load /etc/config/wireless28 for cfgsec in $CONFIG_SECTIONS; do29 eval "cfgtype=\$CONFIG_${cfgsec}_TYPE"30 [ "$cfgtype" = "wifi-iface" ] && {31 eval "wdevice=\"\$CONFIG_${cfgsec}_device\""32 eval "manuf=\"\$CONFIG_${wdevice}_type\""33 case "$manuf" in34 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 ]; then43 cur_iface=$(printf "$wdevice.%d" "$(( $wdcnt - 1))")44 else45 cur_iface="$wdevice"46 fi47 ;;48 esac49 eval "cfgnet=\$CONFIG_${cfgsec}_network"50 eval "isbridge=\"${cfgnet}_bridge\""51 if [ "$isbridge" != "1" ]; then52 eval "${cfgnet}_iface=\"${cur_iface}\""53 fi54 frm_wifaces="$frm_wifaces $cur_iface"55 }56 done57 49 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 51 wlan_freq="${wlan_freq:-0}" 52 wlan_noise="${wlan_noise:-0}" 53 wlan_txpwr="${wlan_txpwr:-0}" 54 55 # enumerate WAN nameservers 56 form_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 61 if [ -n "$wan_config" ]; then 62 display_form <<EOF 63 64 start_form|@TR<<WAN>> 65 field|@TR<<MAC Address>>|wan_mac_addr 66 string|<div class="mac-address">$wan_mac_addr</div> 67 field|@TR<<IP Address>>|wan_ip_addr 68 string|$wan_ip_addr 70 69 $form_dns_servers 70 field|@TR<<Received>>|wan_rx 71 string|$wan_rx_packets @TR<<status_interfaces_pkts#pkts>> ($wan_rx_bytes) 72 field|@TR<<Transmitted>>|wan_tx 73 string|$wan_tx_packets @TR<<status_interfaces_pkts#pkts>> ($wan_tx_bytes 74 helpitem|WAN 75 helptext|WAN WAN#WAN stands for Wide Area Network and is usually the upstream connection to the internet. 71 76 end_form 72 77 EOF 73 } 78 fi 74 79 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:-" "}" 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>> ($rx_bytes) 103 field|@TR<<Transmitted>>|${ifpar}_tx 104 string|$tx_packets @TR<<status_interfaces_pkts#pkts>> ($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 80 display_form <<EOF 81 start_form|@TR<<LAN>> 82 field|@TR<<MAC Address>>|lan_mac_addr 83 string|$lan_mac_addr 84 field|@TR<<IP Address>>|lan_ip_addr 85 string|$lan_ip_addr 86 field|@TR<<Received>>|lan_rx 87 string|$lan_rx_packets @TR<<status_interfaces_pkts#pkts>> ($lan_rx_bytes) 88 field|@TR<<Transmitted>>|lan_tx 89 string|$lan_tx_packets @TR<<status_interfaces_pkts#pkts>> ($lan_tx_bytes 90 helpitem|LAN 91 helptext|LAN LAN#LAN stands for Local Area Network. 125 92 end_form 126 EOF127 }128 fi129 }130 93 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 94 start_form|@TR<<WLAN>> 170 95 field|@TR<<Access Point>>|wlan_ap 171 96 string|$wlan_ap … … 175 100 string|$wlan_ssid 176 101 field|@TR<<Frequency>>|wlan_freq 177 string|$wlan_freq @TR<<GHz>>102 string|$wlan_freq Ghz 178 103 field|@TR<<Transmit Power>>|wlan_txpwr 179 string|$wlan_txpwr @TR<<dBm>>104 string|$wlan_txpwr dBm 180 105 field|@TR<<Noise Level>>|wlan_noise 181 string|$wlan_noise @TR<<dBm>>106 string|$wlan_noise dBm 182 107 field|@TR<<Encryption Key>>|wlan_key 183 108 string|$wlan_key 184 field|@TR<<Security mode>>|wlan_secmode185 string|$wlan_secmode186 109 field|@TR<<Rx Invalid nwid>>|wlan_rx_invalid_nwid 187 110 string|$wlan_rx_invalid_nwid … … 195 118 string|$wlan_tx_missed 196 119 helpitem|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 120 helptext|WLAN LAN#LAN stands for Wireless Local Area Network. 121 field||spacer1 122 string|<br /><br /> 225 123 field||show_raw 226 124 formtag_begin|raw_stats|$SCRIPT_NAME … … 229 127 end_form 230 128 EOF 231 else232 cat <<EOF233 129 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 134 display_form <<EOF 135 start_form|@TR<<Raw Information>> 239 136 EOF 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 138 echo "<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>" 145 ifconfig 2>&1 | grep -A 6 "$CONFIG_wan_ifname[[:space:]]" 146 echo "</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>" 154 ifconfig 2>&1 | grep -A 6 "$CONFIG_lan_ifname[[:space:]]" 155 echo "</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>" 163 iwconfig 2>&1 | grep -v 'no wireless' | grep '\w' 164 echo "</pre></td> 165 </tr> 166 </div>" 167 168 display_form <<EOF 297 169 end_form 298 170 EOF 299 fi 171 } 300 172 301 173 footer ?> firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-processes.sh
r354 r386 135 135 tr_ind = "" 136 136 td_ind = "\t" 137 }138 function readcmdline(pid) {139 if (("/bin/cat /proc/" pid "/cmdline 2>/dev/null | tr \"\\0\" \" \"" | getline) > 0) return $0140 else return ""141 137 } 142 138 { … … 176 172 lcol = $5 177 173 for (i=6; i<=NF; i++) lcol = lcol " " $i 178 if (length(lcol) >= 50) {179 fulcmd = readcmdline($1)180 if (fulcmd) lcol = fulcmd181 }182 174 print td_ind "<td>" lcol "</td>" 183 175 if (interval < 1) { firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-qos.sh
r354 r386 79 79 if ! empty "$qos_status" && exists "/usr/bin/qos-stat"; then 80 80 ingress_start_line=$(echo "$qos_status" | grep INGRESS -n | cut -d ':' -f 1) 81 ingress_start_line=$(( $ingress_start_line - 2 )) 2>/dev/null82 81 egress_status=$(echo "$qos_status" | sed "$ingress_start_line,\$ d") 83 82 ingress_status=$(echo "$qos_status" | sed "1,$ingress_start_line d") 84 ingress_stats_table=$(echo -e "$ingress_status\n" |83 ingress_stats_table=$(echo "$ingress_status" | 85 84 (awk \ 86 85 -v root_class="$root_class" \ … … 102 101 } else { 103 102 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> </td>" 104 117 } 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> </td>" 119 } 120 print "</tr>" 121 } 118 print "</tr>" 122 119 } 123 120 }')) … … 142 139 143 140 144 egress_stats_table=$(echo -e "$egress_status\n" |141 egress_stats_table=$(echo "$egress_status" | 145 142 (awk \ 146 143 -v root_class="$root_class" \ … … 162 159 } else { 163 160 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> </td>" 164 175 } 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> </td>" 179 } 180 print "</tr>" 181 } 176 print "</tr>" 182 177 } 183 178 }')) firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/status-usb.sh
r354 r386 8 8 9 9 if ! empty "$FORM_umount"; then 10 if ! empty "$FORM_mount dev"; then11 err_umount=$(umount $FORM_mount dev2>&1)10 if ! empty "$FORM_mountpoint"; then 11 err_umount=$(umount $FORM_mountpoint 2>&1) 12 12 ! equal "$?" "0" && { 13 13 ERROR="@TR<<status_usb_umount_error_in#Error in>> $err_umount" … … 85 85 <table style="width: 90%; margin-left: 2.5em; text-align: left; font-size: 0.9em;" border="0" cellpadding="3" cellspacing="2"> 86 86 <? 87 mounted_devices="$(cat /proc/mounts | grep "^/dev/s d[a-p]\{0,2\}[[:space:]]")"87 mounted_devices="$(cat /proc/mounts | grep "^/dev/scsi/")" 88 88 ! equal "$mounted_devices" "" && { 89 89 echo "$mounted_devices" | awk ' … … 113 113 print " <td>" $2 "</td>" 114 114 print " <td>" $3 "</td>" 115 $4 = "," $4 "," 116 if ($4 ~ /,ro,/) 115 if ($4 == "ro") 117 116 print " <td>@TR<<status_usb_ro#Read only>></td>" 118 else if ($4 ~ /,rw,/)117 else if ($4 == "rw") 119 118 print " <td>@TR<<status_usb_rw#Read/Write>></td>" 120 119 else 121 print " <td> </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>" 123 122 print " </tr>" 124 123 } … … 129 128 mnts="$(echo "$mounted_devices" | awk ' 130 129 { 131 sub(/ [[:digit:]]{0,2}$/, "", $1)130 sub(/\/part[[:digit:]]{1,2}.*$/, "", $1) 132 131 print $1 133 132 print $2 … … 150 149 swap_devices="$(cat "/proc/swaps" 2>/dev/null | egrep "$mnts")" 151 150 } || { 152 swap_devices="$(cat "/proc/swaps" 2>/dev/null | grep "^/dev/s d[a-p]\{0,2\}[[:space:]]")"151 swap_devices="$(cat "/proc/swaps" 2>/dev/null | grep "^/dev/scsi/")" 153 152 } 154 153 ! empty "$swap_devices" && { firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-ipkg.sh
r354 r386 40 40 (action=="remove" ? "@TR<<system_ipkg_remove|remove>>" : action); 41 41 if (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 + "&pkg=" + pkg42 window.location="ipkg.sh?action=" + action + "&pkg=" + pkg 43 43 } } 44 44 </script> … … 133 133 EOF 134 134 ?> 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> 136 136 <? 137 137 display_form <<EOF firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-password.sh
r354 r386 6 6 SAVED=1 7 7 validate <<EOF 8 string|FORM_pw1| @TR<<Password>>|required min=5|$FORM_pw18 string|FORM_pw1|Password|required min=5|$FORM_pw1 9 9 EOF 10 10 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 />" 13 12 } 14 13 empty "$ERROR" && { firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/system-settings.sh
r354 r386 17 17 # Major revisions: 18 18 # 19 # NVRAM variables referenced: 20 # time_zone 21 # ntp_server 22 # 19 23 # Configuration files referenced: 20 24 # none 21 25 # 22 23 # handle old/current ntpclient configuration24 grep -q "^[[:space:]]*ntpclient)" /etc/hotplug.d/iface/*-ntpclient 2>/dev/null && ntpcliconf="ntpclient" || ntpcliconf="ntp_client"25 26 # Add NTP Server27 if ! empty "$FORM_add_ntpcfg_number"; then28 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 fi34 35 # Remove NTP Server36 if ! empty "$FORM_remove_ntpcfg"; then37 uci_remove "$ntpcliconf" "$FORM_remove_ntpcfg"38 fi39 26 40 27 config_cb() { … … 47 34 timezone_cfg="$CONFIG_SECTION" 48 35 ;; 49 ntp_client|ntpclient)50 append ntpservers "$CONFIG_SECTION" "$N"51 ;;52 36 esac 53 37 } 54 38 39 is_bcm947xx && { 40 load_settings "system" 41 load_settings "webif" 42 } 43 55 44 uci_load "webif" 56 uci_load "webifssl"57 45 uci_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"63 46 uci_load "network" 64 47 uci_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 # 60 OVERCLOCKING_DISABLED="1" # set to 1 to disble OC support, we disable overclocking by default for kamikaze and only enable it for bcm947xx 61 is_bcm947xx && { 62 OVERCLOCKING_DISABLED="0" 63 } 74 64 75 65 ##################################################################### 76 66 header "System" "Settings" "@TR<<System Settings>>" ' onload="modechange()" ' "$SCRIPT_NAME" 67 68 ##################################################################### 69 # todo: CPU_MODEL not actually used atm (except in building version) 70 equal "$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 } 77 76 78 77 ##################################################################### … … 85 84 fi 86 85 87 generate_ssl_key() {88 local inst_packages llib llink libsymlinks89 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-overwrite96 is_package_installed "openssl-util"97 if [ "$?" = "0" ]; then98 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); do99 llink=$(echo "$llib" | sed 's/\/tmp//')100 ln -s $llib $llink101 [ "$?" = "0" ] && libsymlinks="$libsymlinks $llink"102 done103 if [ -z "$(ps -A | grep "[n]tpd\>")" ]; then104 is_package_installed "ntpclient"105 [ "$?" != "0" ] && {106 echo "@TR<<system_settings_Updating_time#Updating time>> ..."107 rdate -s pool.ntp.org108 }109 fi110 export RANDFILE="/tmp/.rnd"111 dd if=/dev/urandom of="$RANDFILE" count=1 bs=512 2>/dev/null112 (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/null114 unset RANDFILE115 fi116 [ -n "$libsymlinks" ] && rm -f $libsymlinks117 [ -n "$inst_packages" ] && ipkg remove $inst_packages118 }119 120 86 if ! empty "$FORM_install_stunnel"; then 121 87 echo "@TR<<system_settings_Installing_MatrixTunnel_package#Installing MatrixTunnel package>> ...<pre>" 122 88 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 133 133 echo "</pre><br />" 134 134 fi … … 138 138 if empty "$FORM_submit"; then 139 139 # initialize all defaults 140 eval CONFIG_system_hostname="\$CONFIG_${hostname_cfg}_hostname" 141 FORM_hostname="${CONFIG_system_hostname:-OpenWrt}" 140 142 eval time_zone_part="\$CONFIG_${timezone_cfg}_posixtz" 141 143 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)}" 142 146 time_zone_part="${time_zone_part:-"UTC+0"}" 143 147 time_zoneinfo_part="${time_zoneinfo_part:-"-"}" … … 149 153 FORM_wait_time="${wait_time:-$(nvram get wait_time)}" 150 154 FORM_wait_time="${FORM_wait_time:-1}" 155 FORM_clkfreq="${clkfreq:-$(nvram get clkfreq)}"; 156 FORM_clkfreq="${FORM_clkfreq:-200}" 151 157 } 152 158 # webif settings … … 155 161 FORM_language="${CONFIG_general_lang:-en}" 156 162 FORM_theme=${CONFIG_theme_id:-xwrt} 157 FORM_ssl_enable="${CONFIG_ matrixtunnel_enable:-0}"163 FORM_ssl_enable="${CONFIG_ssl_enable:-0}" 158 164 else 159 165 ##################################################################### … … 166 172 time_zone_part="${FORM_system_timezone#*@}" 167 173 time_zoneinfo_part="${FORM_system_timezone%@*}" 168 empty "$hostname_cfg" && {169 uci_add system system170 hostname_cfg="cfg1"171 }172 174 uci_set "system" "$hostname_cfg" "hostname" "$FORM_hostname" 173 175 empty "$timezone_cfg" && { … … 177 179 uci_set timezone "$timezone_cfg" posixtz "$time_zone_part" 178 180 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" 187 183 188 184 is_bcm947xx && { … … 194 190 save_setting system wait_time "$FORM_wait_time" 195 191 } 192 equal "$OVERCLOCKING_DISABLED" "0" && ! empty "$FORM_clkfreq" && 193 { 194 save_setting nvram clkfreq "$FORM_clkfreq" 195 } 196 196 } 197 197 # 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" 202 199 uci_set "webif" "theme" "id" "$FORM_theme" 203 200 uci_set "webif" "general" "lang" "$FORM_language" … … 216 213 submit|install_stunnel| @TR<<system_settings_Install_MatrixTunnel#Install MatrixTunnel>> |" 217 214 else 218 if [ -e /etc/ssl/matrixtunnel.key -a -e /etc/ssl/matrixtunnel.cert ]; then 219 WEBIF_SSL="$WEBIF_SSL 215 WEBIF_SSL="$WEBIF_SSL 220 216 select|ssl_enable|$FORM_ssl_enable 221 217 option|0|@TR<<system_settings_webifssl_Off#Off>> 222 218 option|1|@TR<<system_settings_webifssl_On#On>>" 223 else224 WEBIF_SSL="$WEBIF_SSL225 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 fi228 219 fi 229 220 … … 238 229 # 239 230 is_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 240 260 ##################################################################### 241 261 # Initialize wait_time form … … 282 302 THEMES=$(echo "$THEMES" | sort -u) 283 303 304 dangerous_form_start="" 305 dangerous_form_end="" 306 dangerous_form_help="" 307 284 308 ##################################################################### 285 309 # Initialize LANGUAGES form … … 303 327 helptext|HelpText wait_time#Number of seconds the boot loader should wait for a TFTP transfer if Boot Wait is on." 304 328 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. 341 342 if [ -n "$(has_pkgs ntpclient)" -a -n "$(has_pkgs openntpd)" ]; then 342 343 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> … … 425 426 helpitem|Timezone 426 427 helptext|Timezone_helptext#Set up your time zone according to the nearest city of your region from the predefined list. 427 $NTP 428 field|@TR<<NTP Server>> 429 text|ntp_server|$FORM_ntp_server 428 430 end_form 429 431 $NTPCLIENT_INSTALL_FORM … … 440 442 $WEBIF_SSL 441 443 end_form 444 # end webif settings 445 ########################### 446 $dangerous_form_start 447 $clkfreq_form 448 $dangerous_form_help 449 $dangerous_form_end 442 450 EOF 443 451 firmware/trunk/kamikaze/package/webif/files/www/cgi-bin/webif/views/info-about.ahtml
r354 r386 26 26 <li><a href="mailto:mtsales@users.berlios.de">Mario Sales</a></li> 27 27 <li><a href="mailto:markus@freewrt.org">Markus Wigge</a></li> 28 <li><a href="mailto:liran@enginx.com">Liran Tal</a></li>29 28 <li><a href="mailto:o.hardy@mail2web.com">Olivier Hardy (SeDkY)</li> 30 29 <li><a href="mailto:seitel@users.berlios.de">Stefan Eitel</a></li> firmware/trunk/kamikaze/package/webif/ipkg/webif.postinst
r354 r386 80 80 # don't run below on 'real' system 81 81 if [ -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 83 85 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/$S/packages" 84 else85 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/$S/packages"86 86 fi 87 87 fi … … 89 89 # only run below on 'real' system (not image builder) 90 90 if [ -z "${IPKG_INSTROOT}" ]; then 91 92 grep -q "7.07" "/etc/banner" 93 [ $? = 0 ] && { 94 revision="7.07" 95 } 96 91 97 92 # initialize ipkg.conf 98 93 uname -a |grep mips |grep 2.4 && cat /proc/cpuinfo |grep Broadcom 99 94 [ $? = 0 ] && { 100 95 #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 106 100 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm-2.4/packages" 107 else108 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/brcm-2.4/packages"109 101 fi 110 102 } … … 114 106 cat /proc/cpuinfo | grep BCM63xx && SYSTYPE="63xx" 115 107 #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" 119 109 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 121 113 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm${SYSTYPE}-2.6/packages" 122 else123 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/brcm${SYSTYPE}-2.6/packages"124 114 fi 125 115 fi … … 129 119 [ $? = 0 ] && { 130 120 #Delete incorrect repo 131 if [ "$revision" = "7.07" ]; then132 DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/x86-2.6/packages"133 fi134 if [ "$revision" = "" ]; then121 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 135 125 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/x86-2.6/packages" 136 else137 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/x86-2.6/packages"138 126 fi 139 127 } … … 141 129 [ $? = 0 ] && { 142 130 #Delete incorrect repo 143 if [ "$revision" = "7.07" ]; then144 DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages"145 fi146 if [ "$revision" = "" ]; then131 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 147 135 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages" 148 else149 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/atheros-2.6/packages"150 fi151 }152 uname -a |grep mips |grep 2.6 && cat /proc/cpuinfo |grep WP54153 [ $? = "0" ] && {154 #Delete incorrect repo155 if [ "$revision" = "7.07" ]; then156 DeleteRepository "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/adm5120-2.6/packages"157 fi158 if [ "$revision" = "" ]; then159 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/adm5120-2.6/packages"160 else161 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/adm5120-2.6/packages"162 136 fi 163 137 } 164 138 cat /proc/cpuinfo |grep "IXP4\?\?" 165 139 [ $? = "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 171 143 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/ixp4xx-2.6/packages" 172 else173 AddRepository "X-Wrt" "http://downloads.x-wrt.org/xwrt/kamikaze/$revision/ixp4xx-2.6/packages"174 144 fi 175 145 } … … 190 160 /etc/init.d/webif enable 191 161 /etc/init.d/custom-user-startup enable 192 193 # start X-Wrt specific services194 /etc/init.d/syslog enable195 /etc/init.d/timezone enable196 162 197 ExecuteIfExists "/etc/init.d/timezone" start 163 #FIXME: Syslog needs to be double checked 164 #/etc/init.d/syslog enable 165 198 166 ExecuteIfExists "/etc/init.d/webif" start 199 167
