Skip to content

Commit

Permalink
Get resolvfile from configuration
Browse files Browse the repository at this point in the history
Fix #12
  • Loading branch information
Bloup1net committed Dec 31, 2020
1 parent fb3be84 commit a717723
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion files/etc/init.d/phantap
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ uci commit
}

_config_dns() {
echo "nameserver $P_DNS" > /tmp/resolv.conf.auto
resolvfile=$(uci -q get dhcp.@dnsmasq[0].resolvfile)
[ -z "$resolvfile" ] && { echo "Resolvfile not set"; exit; }
echo "nameserver $P_DNS" > "$resolvfile"
/etc/init.d/dnsmasq reload
}

Expand Down

0 comments on commit a717723

Please sign in to comment.