h69k/package/network/services/dnsmasq/files/50-dnsmasq-migrate-resolv-conf-auto.sh
2024-09-29 22:35:28 +08:00

14 lines
318 B
Bash
Executable File

#!/bin/sh
uci -q get dhcp.@dnsmasq[0].mini_ttl >"/dev/null" && {
uci rename dhcp.@dnsmasq[0].mini_ttl="min_cache_ttl"
uci commit dhcp
}
[ "$(uci get dhcp.@dnsmasq[0].resolvfile)" = "/tmp/resolv.conf.auto" ] && {
uci set dhcp.@dnsmasq[0].resolvfile="/tmp/resolv.conf.d/resolv.conf.auto"
uci commit dhcp
}
exit 0