Changeset 21249


Ignore:
Timestamp:
2010-04-29T06:35:48+02:00 (6 years ago)
Author:
craigc
Message:

[packages] multiwan: removed resolv_conf settings and added dns server override & updated default config file.

Location:
packages/net/multiwan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • packages/net/multiwan/Makefile

    r21176 r21249  
    99 
    1010PKG_NAME:=multiwan 
    11 PKG_VERSION:=1.0m 
     11PKG_VERSION:=1.0.1 
    1212PKG_RELEASE:=1 
    1313 
  • packages/net/multiwan/files/etc/config/multiwan

    r21116 r21249  
    22config 'multiwan' 'config' 
    33        option 'default_route' 'balancer' 
    4         option 'resolv_conf' '/tmp/resolv.conf.auto' 
    54 
    65config 'interface' 'wan' 
     
    1110        option 'health_fail_retries' '3' 
    1211        option 'health_recovery_retries' '5' 
    13         option 'failover_to' 'balancer' 
     12        option 'failover_to' 'wan2' 
     13        option 'dns' 'auto' 
    1414 
    1515config 'interface' 'wan2' 
     
    2020        option 'health_fail_retries' '3' 
    2121        option 'health_recovery_retries' '5' 
    22         option 'failover_to' 'wan3' 
    23  
    24 config 'interface' 'wan3' 
    25         option 'weight' 'disable' 
    26         option 'health_interval' 'disable' 
    27         option 'icmp_hosts' 'gateway' 
    28         option 'timeout' '3' 
    29         option 'health_fail_retries' '3' 
    30         option 'health_recovery_retries' '5' 
    31         option 'failover_to' 'disable' 
    32  
    33 config 'interface' 'wan4' 
    34         option 'weight' '3' 
    35         option 'health_interval' '20' 
    36         option 'icmp_hosts' '208.67.222.222 208.67.220.220' 
    37         option 'timeout' '3' 
    38         option 'health_fail_retries' '3' 
    39         option 'health_recovery_retries' '5' 
    40         option 'failover_to' 'wan' 
     22        option 'failover_to' 'balancer' 
     23        option 'dns' '208.67.222.222 208.67.220.220' 
    4124 
    4225config 'mwanfw' 
    4326        option 'src' '192.168.1.0/24' 
    4427        option 'dst' 'ftp.netlab7.com' 
    45         option 'proto' 'tcp' 
    46         option 'ports' '21' 
    47         option 'wanrule' 'wan4' 
    48  
    49 config 'mwanfw' 
    5028        option 'proto' 'tcp' 
    5129        option 'ports' '21' 
  • packages/net/multiwan/files/usr/bin/multiwan

    r21176 r21249  
    446446local failchk 
    447447local compile_dns 
    448 local resolv_conf 
    449448local dns_server 
    450449local i 
     
    452451iptables -F MultiWanDNS -t mangle 
    453452 
    454 rm $resolv_conf 
    455 touch $resolv_conf 
     453rm /tmp/resolv.conf.auto 
     454touch /tmp/resolv.conf.auto 
    456455 
    457456echo "## Refreshing DNS Resolution and Tables ##" 
     
    466465failchk=$(query_config failchk $group) 
    467466 
     467dns=`uci -q -P /var/state get multiwan.${group}.dns` 
     468 
     469if [ -z "$dns" -o "$dns" == "auto" ]; then 
    468470dns=`uci -q -P /var/state get network.${group}.dns` 
     471fi 
     472 
    469473dns=$(echo $dns | sed -e "s/ /\n/g") 
    470474 
     
    475479 
    476480                compile_dns="nameserver $dns_server" 
    477                 echo "$compile_dns" >> $resolv_conf 
     481                echo "$compile_dns" >> /tmp/resolv.conf.auto 
    478482done 
    479483fi 
     
    833837                icmp_hosts_acquire=$gateway 
    834838        elif [ "$icmp_hosts" == "dns" ]; then 
    835                 icmp_hosts_acquire=`uci -q -P /var/state get network.$1.dns` 
     839                icmp_hosts_acquire=`uci -q -P /var/state get multiwan.$1.dns` 
     840                if [ -z "$icmp_hosts_acquire" -o "$icmp_hosts_acquire" == "auto" ]; then 
     841                icmp_hosts_acquire=`uci -q -P /var/state get network.$1.dns` 
     842                fi 
    836843        else 
    837844                icmp_hosts_acquire=$icmp_hosts 
     
    941948config_load "multiwan" 
    942949config_get default_route    config default_route 
    943 config_get resolv_conf      config resolv_conf 
    944950config_get debug            config debug  
    945951 
Note: See TracChangeset for help on using the changeset viewer.