mirror of
https://github.com/itdoginfo/ansible-openwrt-hirkn.git
synced 2025-12-13 18:44:31 +05:00
Execute confdir only for 24 and newer versions
This commit is contained in:
@@ -327,6 +327,8 @@ fi
|
||||
}
|
||||
|
||||
dnsmasqconfdir() {
|
||||
openwrt_release=$(cat /etc/openwrt_release | grep -Eo [0-9]{2}[.][0-9]{2}[.][0-9]* | cut -d '.' -f 1 | tail -n 1)
|
||||
if [ $openwrt_release -ge 24 ]; then
|
||||
if uci get dhcp.@dnsmasq[0].confdir | grep -q /tmp/dnsmasq.d; then
|
||||
printf "\033[32;1mconfdir alreadt set\033[0m\n"
|
||||
else
|
||||
@@ -334,7 +336,9 @@ dnsmasqconfdir() {
|
||||
uci set dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d'
|
||||
uci commit dhcp
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
remove_forwarding() {
|
||||
if [ ! -z "$forward_id" ]; then
|
||||
while uci -q delete firewall.@forwarding[$forward_id]; do :; done
|
||||
|
||||
Reference in New Issue
Block a user