mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-26 15:21:08 +02:00
[package] ppp: process option dns if peerdns is off (#6474)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19093 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
3afb594a0d
commit
ab2cda2f10
@ -51,9 +51,16 @@ start_pppd() {
|
||||
interval="${keepalive##*[, ]}"
|
||||
[ "$interval" != "$keepalive" ] || interval=5
|
||||
|
||||
config_get_bool peerdns "$cfg" peerdns 1
|
||||
[ "$peerdns" -eq 1 ] && peerdns="usepeerdns" || peerdns=""
|
||||
|
||||
config_get_bool peerdns "$cfg" peerdns 1
|
||||
[ "$peerdns" -eq 1 ] && peerdns="usepeerdns" || {
|
||||
peerdns=""
|
||||
config_get dns "$config" dns
|
||||
for dns in $dns; do
|
||||
grep -q "$dns" /tmp/resolv.conf.auto 2>/dev/null || \
|
||||
echo "nameserver $dns" >> /tmp/resolv.conf.auto
|
||||
done
|
||||
}
|
||||
|
||||
config_get demand "$cfg" demand
|
||||
[ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user