From: Florian Fainelli Date: Sat, 20 May 2006 19:06:26 +0000 (+0000) Subject: webif : - add support for wl0_wdstimeout, wl0_antdiv (request by french Wireless... X-Git-Tag: whiterussian_rc6~239 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f8b453fa0bf0f7a014ac675f42cddf9406cdd4d4;p=openwrt%2Fsvn-archive%2Fopenwrt.git webif : - add support for wl0_wdstimeout, wl0_antdiv (request by french Wireless User Groups), wl0_distance - updated french translation, needs to update other translations - Fixed cancel button not working, closes #543 - Preliminary OpenVPN webif support, partially closes #525 ntpclient: fix process running detection, closes #505 base-files: - clean up per interface static_route code,restore old behaviour (with metric, gateway ...), closes #484 - add ifup_interfaces variable, can be used as order to bring interfaces, closes #309 SVN-Revision: 3809 --- diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 4af6dceaab..8072c9ac62 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -43,14 +43,13 @@ do_ifup() { ${gateway:+$DEBUG route add default gw $gateway} [ -n "$static_route" ] && { - for route in $static_route; do - if [ "$(echo $route | cut -d \/ -f2)" != "32" ]; - then - route add -net $(echo $route | cut -d \/ -f1) netmask $(echo $route | cut -d \/ -f1) dev $if - else - route add -host $(echo $route | cut -d \/ -f1) dev $if + for route in $static_route; do { + eval "set $(echo $route | sed 's/:/ /g')" + if [ "$2" = "255.255.255.255" ]; then + opt="-host" fi - done + $DEBUG route add ${opt:-"-net"} $1 netmask $2 gw $3 metric $4 + } done } [ -f /etc/resolv.conf ] || { diff --git a/openwrt/package/base-files/default/etc/init.d/S05nvram b/openwrt/package/base-files/default/etc/init.d/S05nvram index 2e6f2b9357..add4ef2722 100755 --- a/openwrt/package/base-files/default/etc/init.d/S05nvram +++ b/openwrt/package/base-files/default/etc/init.d/S05nvram @@ -132,6 +132,8 @@ nvram set lan_proto="static" debug "### wla2-g54l hacks ###" nvram_default wan_ifname "none" fixup_lan "vlan0" "vlan0 eth1" + nvram_default vlan0ports "1 2 5t" + nvram_default vlan1ports "3 4 5t" } # wrtsl54gs vlan defaults diff --git a/openwrt/package/base-files/default/etc/init.d/S40network b/openwrt/package/base-files/default/etc/init.d/S40network index d8b4e4125e..8c17167d4f 100755 --- a/openwrt/package/base-files/default/etc/init.d/S40network +++ b/openwrt/package/base-files/default/etc/init.d/S40network @@ -1,14 +1,13 @@ #!/bin/sh case "$1" in start|restart) - ifup lan - ifup wan - ifup wifi - wifi up - - for route in $(nvram get static_route); do { - eval "set $(echo $route | sed 's/:/ /g')" - $DEBUG route add -net $1 netmask $2 gw $3 metric $4 dev $5 - } done - ;; + ifup_interfaces=$(nvram get ifup_interfaces) + ifup_interfaces=${ifup_interfaces:-"wan lan wifi"} + for iface in $ifup_interfaces; do + ifup $iface + if [ "$iface" = "wifi" ]; then + $iface up + fi + done + ;; esac diff --git a/openwrt/package/ntpclient/files/ntpclient.init b/openwrt/package/ntpclient/files/ntpclient.init index c8505c5cad..116e9fe58f 100644 --- a/openwrt/package/ntpclient/files/ntpclient.init +++ b/openwrt/package/ntpclient/files/ntpclient.init @@ -1,8 +1,8 @@ #!/bin/sh server=$(nvram get ntp_server) -case "$ACTION" in +case "${ACTION:-ifup}" in ifup) - ps x | grep '[n]tpclient' >&- || { + ps x | grep 'bin/[n]tpclient' >&- || { route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${server:-pool.ntp.org} & } ;; diff --git a/openwrt/package/openvpn/Config.in b/openwrt/package/openvpn/Config.in index 65a1bf8dc8..d1ec8566ed 100644 --- a/openwrt/package/openvpn/Config.in +++ b/openwrt/package/openvpn/Config.in @@ -16,6 +16,15 @@ config BR2_PACKAGE_OPENVPN_EASY_RSA depends BR2_PACKAGE_OPENVPN select BR2_PACKAGE_OPENSSL_UTIL +config BR2_PACKAGE_OPENVPN_WEBIF + tristate "openvpn-webif - web interface module to configure OpenVPN (client mode)" + default m + depends BR2_PACKAGE_OPENVPN + select BR2_PACKAGE_WEBIF + help + Web interface module to configure and report status of OpenVPN (client + mode only) + config BR2_PACKAGE_OPENVPN_SERVER bool "Enable server support" default y @@ -43,6 +52,11 @@ config BR2_PACKAGE_OPENVPN_PASSWORD_SAVE default y depends BR2_PACKAGE_OPENPVN +config BR2_PACKAG_OPENVPN_MANAGEMENT + bool "Enable PKCS12 management features" + default n + depends BR2_PACKAGE_OPENVPN + config BR2_PACKAGE_OPENVPN_SMALL bool "Enable smaller executable size (disable OCC, usage message, and verb 4 parm list)" default n diff --git a/openwrt/package/openvpn/Makefile b/openwrt/package/openvpn/Makefile index ab92fedbdd..371ffbbbe2 100644 --- a/openwrt/package/openvpn/Makefile +++ b/openwrt/package/openvpn/Makefile @@ -18,6 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,OPENVPN_EASY_RSA,openvpn-easy-rsa,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,OPENVPN_WEBIF,openvpn-webif,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) PKG_DEPEND:="kmod-tun" ifneq ($(BR2_PACKAGE_OPENVPN_OPENSSL),y) @@ -42,6 +43,9 @@ endif ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y) ENABLE_SMALL:=--enable-small endif +ifneq ($(BR2_PACKAGE_OPENVPN_MANAGEMENT),y) +DISABLE_SMALL:=--disable-management +endif $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ @@ -82,6 +86,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared $(DISABLE_HTTP) \ $(ENABLE_PASSWORD_SAVE) \ $(ENABLE_SMALL) \ + $(DISABLE_MANAGEMENT) \ ); touch $(PKG_BUILD_DIR)/.configured @@ -106,3 +111,9 @@ $(IPKG_OPENVPN_EASY_RSA): install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars $(IPKG_BUILD) $(IDIR_OPENVPN_EASY_RSA) $(PACKAGE_DIR) + +$(IPKG_OPENVPN_WEBIF): + install -d -m0755 $(IDIR_OPENVPN_WEBIF)/etc/init.d $(IDIR_OPENVPN_WEBIF)/www/cgi-bin/webif + install -m0755 ./files/S50openvpn $(IDIR_OPENVPN_WEBIF)/etc/init.d/S50openvpn + cp -fpR .files/openvpn{,-status}.sh $(IDIR_OPENVPN_WEBIF)/www/cgi-bin/webif/ + $(IPKG_BUILD) $(IDIR_OPENVPN_WEBIF) $(PACKAGE_DIR) diff --git a/openwrt/package/webif/files/usr/lib/webif/lang/fr/common.txt b/openwrt/package/webif/files/usr/lib/webif/lang/fr/common.txt index 398755264f..94ea6d4dc3 100644 --- a/openwrt/package/webif/files/usr/lib/webif/lang/fr/common.txt +++ b/openwrt/package/webif/files/usr/lib/webif/lang/fr/common.txt @@ -182,6 +182,8 @@ Deny => Refuser Set => Paramètrer Settings => Paramètres Automatic WDS => WDS automatique +WDS watchdog timeout => Délai d'inactivité WDS +Antenna selection => Sélection de l'antenne # "Hosts" page diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/firewall.sh b/openwrt/package/webif/files/www/cgi-bin/webif/firewall.sh index 0fd84f884b..e9228dcdb4 100755 --- a/openwrt/package/webif/files/www/cgi-bin/webif/firewall.sh +++ b/openwrt/package/webif/files/www/cgi-bin/webif/firewall.sh @@ -8,8 +8,23 @@ exists "$FW_FILE" || touch "$FW_FILE" >&- 2>&- FW_FILE_NEW="/tmp/.webif/file-firewall-new" empty "$FORM_cancel" || { + empty "$FORM_delete_on_cancel" || { + awk \ + -f - "$FW_FILE" > "$FW_FILE_NEW" < " button("save", "Save") button("cancel", "Cancel") "" - + printf " " button("save", "Save") + if( delete_on_cancel != "" ) print hidden("delete_on_cancel", 1); + print button("cancel", "Cancel") + print "" print "" print "" print "" @@ -318,6 +336,7 @@ END { print "
" print hidden("edit", n + 1); print "