View difference between Paste ID: fLwvV359 and h0ksrsjr
SHOW: | | - or go back to the newest paste.
1
#!/bin/sh
2
##################################################################
3
## Certain DD-WRT seem to append user DNS with ISP provided DNS ##
4
## Which has priority over user DNS. This script fixes this.    ##
5
##################################################################
6
7-
nvram get wan_dns | awk 'BEGIN{FS=" "}{for (i=1; i<=NF; i++) printf "nameserver %s
7+
nvram get wan_dns | awk 'BEGIN{FS=" "}{for (i=1; i<=NF; i++) printf "nameserver %s", $i; }' > /tmp/resolv.dnsmasq
8-
", $i; }' > /tmp/resolv.dnsmasq
8+
9
dnsmasq --conf-file=/tmp/dnsmasq.conf