Changeset 19093


Ignore:
Timestamp:
2010-01-10T17:28:09+01:00 (7 years ago)
Author:
jow
Message:

[package] ppp: process option dns if peerdns is off (#6474)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/ppp/files/ppp.sh

    r17529 r19093  
    5252        [ "$interval" != "$keepalive" ] || interval=5 
    5353 
    54         config_get_bool peerdns "$cfg" peerdns 1  
    55         [ "$peerdns" -eq 1 ] && peerdns="usepeerdns" || peerdns=""  
    56          
     54        config_get_bool peerdns "$cfg" peerdns 1 
     55        [ "$peerdns" -eq 1 ] && peerdns="usepeerdns" || { 
     56                peerdns="" 
     57                config_get dns "$config" dns 
     58                for dns in $dns; do 
     59                        grep -q "$dns" /tmp/resolv.conf.auto 2>/dev/null || \ 
     60                                echo "nameserver $dns" >> /tmp/resolv.conf.auto 
     61                done 
     62        } 
     63 
    5764        config_get demand "$cfg" demand 
    5865        [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto 
Note: See TracChangeset for help on using the changeset viewer.