Changeset 3809


Ignore:
Timestamp:
2006-05-20T21:06:26+02:00 (10 years ago)
Author:
florian
Message:

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
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/whiterussian/openwrt/package/base-files/default/etc/functions.sh

    r3628 r3809  
    4444 
    4545                [ -n "$static_route" ] && { 
    46                         for route in $static_route; do 
    47                                 if [ "$(echo $route | cut -d \/ -f2)" != "32" ]; 
    48                                 then 
    49                                         route add -net $(echo $route | cut -d \/ -f1) netmask $(echo $route | cut -d \/ -f1) dev $if 
    50                                 else 
    51                                         route add -host $(echo $route | cut -d \/ -f1) dev $if 
     46                        for route in $static_route; do { 
     47                        eval "set $(echo $route | sed 's/:/ /g')" 
     48                                if [ "$2" = "255.255.255.255" ]; then 
     49                                        opt="-host" 
    5250                                fi 
    53                         done 
     51                                $DEBUG route add ${opt:-"-net"} $1 netmask $2 gw $3 metric $4  
     52                        } done 
    5453                } 
    5554 
  • branches/whiterussian/openwrt/package/base-files/default/etc/init.d/S05nvram

    r3430 r3809  
    133133        nvram_default wan_ifname "none" 
    134134        fixup_lan "vlan0" "vlan0 eth1" 
     135        nvram_default vlan0ports "1 2 5t" 
     136        nvram_default vlan1ports "3 4 5t" 
    135137} 
    136138 
  • branches/whiterussian/openwrt/package/base-files/default/etc/init.d/S40network

    r1629 r3809  
    22case "$1" in 
    33  start|restart) 
    4     ifup lan 
    5     ifup wan 
    6     ifup wifi 
    7     wifi up 
    8  
    9     for route in $(nvram get static_route); do { 
    10       eval "set $(echo $route | sed 's/:/ /g')" 
    11       $DEBUG route add -net $1 netmask $2 gw $3 metric $4 dev $5 
    12     } done 
    13     ;; 
     4  ifup_interfaces=$(nvram get ifup_interfaces) 
     5  ifup_interfaces=${ifup_interfaces:-"wan lan wifi"} 
     6  for iface in $ifup_interfaces; do 
     7        ifup $iface 
     8        if [ "$iface" = "wifi" ]; then 
     9                $iface up 
     10        fi 
     11  done 
     12  ;; 
    1413esac 
  • branches/whiterussian/openwrt/package/ntpclient/files/ntpclient.init

    r2886 r3809  
    11#!/bin/sh 
    22server=$(nvram get ntp_server) 
    3 case "$ACTION" in 
     3case "${ACTION:-ifup}" in 
    44        ifup) 
    5                 ps x | grep '[n]tpclient' >&- || { 
     5                ps x | grep 'bin/[n]tpclient' >&- || { 
    66                        route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${server:-pool.ntp.org} & 
    77                } 
  • branches/whiterussian/openwrt/package/openvpn/Config.in

    r3800 r3809  
    1616        depends BR2_PACKAGE_OPENVPN 
    1717        select BR2_PACKAGE_OPENSSL_UTIL 
     18 
     19config BR2_PACKAGE_OPENVPN_WEBIF 
     20        tristate "openvpn-webif - web interface module to configure OpenVPN (client mode)" 
     21        default m 
     22        depends BR2_PACKAGE_OPENVPN 
     23        select BR2_PACKAGE_WEBIF 
     24        help 
     25          Web interface module to configure and report status of OpenVPN (client 
     26          mode only) 
    1827 
    1928config BR2_PACKAGE_OPENVPN_SERVER 
     
    4453        depends BR2_PACKAGE_OPENPVN 
    4554 
     55config BR2_PACKAG_OPENVPN_MANAGEMENT 
     56        bool "Enable PKCS12 management features" 
     57        default n 
     58        depends BR2_PACKAGE_OPENVPN 
     59 
    4660config BR2_PACKAGE_OPENVPN_SMALL 
    4761        bool "Enable smaller executable size (disable OCC, usage message, and verb 4 parm list)" 
  • branches/whiterussian/openwrt/package/openvpn/Makefile

    r3800 r3809  
    1919$(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    2020$(eval $(call PKG_template,OPENVPN_EASY_RSA,openvpn-easy-rsa,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     21$(eval $(call PKG_template,OPENVPN_WEBIF,openvpn-webif,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    2122 
    2223PKG_DEPEND:="kmod-tun" 
     
    4243ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y) 
    4344ENABLE_SMALL:=--enable-small 
     45endif 
     46ifneq ($(BR2_PACKAGE_OPENVPN_MANAGEMENT),y) 
     47DISABLE_SMALL:=--disable-management 
    4448endif 
    4549 
     
    8387                  $(ENABLE_PASSWORD_SAVE) \ 
    8488                  $(ENABLE_SMALL) \ 
     89                  $(DISABLE_MANAGEMENT) \ 
    8590        ); 
    8691        touch $(PKG_BUILD_DIR)/.configured 
     
    107112        install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars 
    108113        $(IPKG_BUILD) $(IDIR_OPENVPN_EASY_RSA) $(PACKAGE_DIR) 
     114 
     115$(IPKG_OPENVPN_WEBIF): 
     116        install -d -m0755 $(IDIR_OPENVPN_WEBIF)/etc/init.d $(IDIR_OPENVPN_WEBIF)/www/cgi-bin/webif 
     117        install -m0755 ./files/S50openvpn $(IDIR_OPENVPN_WEBIF)/etc/init.d/S50openvpn 
     118        cp -fpR .files/openvpn{,-status}.sh $(IDIR_OPENVPN_WEBIF)/www/cgi-bin/webif/ 
     119        $(IPKG_BUILD) $(IDIR_OPENVPN_WEBIF) $(PACKAGE_DIR) 
  • branches/whiterussian/openwrt/package/webif/files/usr/lib/webif/lang/fr/common.txt

    r3469 r3809  
    183183Settings => Paramètres 
    184184Automatic WDS => WDS automatique 
     185WDS watchdog timeout => Délai d'inactivité WDS 
     186Antenna selection => Sélection de l'antenne 
    185187 
    186188# "Hosts" page 
  • branches/whiterussian/openwrt/package/webif/files/www/cgi-bin/webif/firewall.sh

    r3255 r3809  
    99 
    1010empty "$FORM_cancel" || { 
     11        empty "$FORM_delete_on_cancel" || { 
     12                awk \ 
     13                        -f - "$FW_FILE" > "$FW_FILE_NEW" <<EOF 
     14BEGIN { 
     15        first=1 
     16} 
     17{ 
     18        if (first != 1) print old 
     19        old = \$0 
     20        first = 0 
     21} 
     22EOF 
     23                mv "$FW_FILE_NEW" "$FW_FILE" 
     24        } 
    1125        FORM_save="" 
    1226        FORM_edit="" 
     27        FORM_cancel="" 
    1328} 
    1429 
     
    170185        -v data_submit="$FORM_data_submit" \ 
    171186        -v new_match="$FORM_new_match" \ 
     187        -v delete_on_cancel="$FORM_delete_on_cancel" \ 
    172188        -f /usr/lib/webif/common.awk \ 
    173189        -f /usr/lib/common.awk \ 
     
    297313(\$1 == "drop") || (\$1 == "accept") || (\$1 == "forward" ) { 
    298314        if (n == edit) { 
    299                 printf "<tr><td>&nbsp;</td><td>" button("save", "Save") button("cancel", "Cancel") "</td></tr>" 
    300                  
     315                printf "<tr><td>&nbsp;</td><td>" button("save", "Save") 
     316                if( delete_on_cancel != "" ) print hidden("delete_on_cancel", 1); 
     317                print button("cancel", "Cancel") 
     318                print "</td></tr>" 
    301319                print "</table>" 
    302320                print "</td></tr>" 
     
    319337        print hidden("edit", n + 1); 
    320338        print "<select name=\\"new_target\\">" 
     339        print hidden("delete_on_cancel", 1); 
    321340        print sel_option("forward", "Forward") 
    322341        print sel_option("accept", "Accept") 
  • branches/whiterussian/openwrt/package/webif/files/www/cgi-bin/webif/wireless-advanced.sh

    r3140 r3809  
    2727                *) FORM_lazywds=0;; 
    2828        esac 
     29        FORM_wdstimeout=${wl0_wdstimeout:-$(nvram get wl0_wdstimeout)} 
     30        FORM_antdiv="${wl0_antdiv:-$(nvram get wl0_antdiv)}" 
     31        case "$FORM_antdiv" in 
     32                -1|auto) FORM_antdiv=-1;; 
     33                0|main|left) FORM_antdiv=0;; 
     34                1|aux|right) FORM_antdiv=1;; 
     35                3|diversity) FORM_antdiv=3;; 
     36                *) FORM_antdiv=-1;; 
     37        esac 
     38        FORM_distance="${wl0_distance:-$(nvram get wl0_distance)}" 
    2939else 
    3040        SAVED=1 
     
    3242        validate <<EOF 
    3343int|FORM_lazywds|Lazy WDS On/Off|required min=0 max=1|$FORM_lazywds 
     44int|FORM_wdstimeout|WDS watchdog timeout|optional min=0 max=3600|$FORM_wdstimeout 
     45int|FORM_distance|Distance|optional min=0 max=256|$FORM_distance 
    3446EOF 
    3547        equal "$?" 0 && { 
    3648                save_setting wireless wl0_lazywds "$FORM_lazywds" 
     49                save_setting wireless wl0_wdstimeout "$FORM_wdstimeout" 
    3750                save_setting wireless wl0_macmode "$FORM_macmode" 
     51                save_setting wireless wl0_antdiv "$FORM_antdiv" 
     52                save_setting wireless wl0_distance "$FORM_distance" 
    3853        } 
    3954fi 
     
    6681option|1|@TR<<Enabled>> 
    6782option|0|@TR<<Disabled>> 
     83field|@TR<<WDS watchdog timeout>> 
     84text|wdstimeout|$FORM_wdstimeout 
    6885field|@TR<<Filter Mode>>: 
    6986select|macmode|$FORM_macmode 
     
    7188option|allow|@TR<<Allow>> 
    7289option|deny|@TR<<Deny>> 
     90field|@TR<<Antenna selection>>: 
     91select|antdiv|$FORM_antdiv 
     92option|-1|@TR<<Automatic>> 
     93option|0|@TR<<Left>> 
     94option|1|@TR<<Right>> 
     95option|3|@TR<<Diversity>> 
     96field|@TR<<Distance>> 
     97text|distance|$FORM_distance 
    7398end_form 
    7499EOF 
  • trunk/openwrt/package/ntpclient/files/ntpclient.init

    r3588 r3809  
    11#!/bin/sh 
    2 case "$ACTION" in 
     2ntp_server=$(nvram get ntp_server) 
     3case "${ACTION:-ifup}" in 
    34        ifup) 
    4                 ps x | grep '[n]tpclient' >&- || { 
     5                ps x | grep 'bin/[n]tpclient' >&- || { 
    56                        route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${ntp_server:-pool.ntp.org} & 
    67                } 
Note: See TracChangeset for help on using the changeset viewer.