diff --git a/install.sh b/install.sh index b0cf819..bba883f 100755 --- a/install.sh +++ b/install.sh @@ -25,12 +25,15 @@ main() { [ -f /etc/config/dhcp-opkg ] && cp /etc/config/dhcp /etc/config/dhcp-old && mv /etc/config/dhcp-opkg /etc/config/dhcp fi - if uci get dhcp.@dnsmasq[0].confdir | grep -q /tmp/dnsmasq.d; then - echo "confdir alreadt set" - else - printf "Setting confdir" - uci set dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d' - uci commit dhcp + 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 + echo "confdir alreadt set" + else + printf "Setting confdir" + uci set dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d' + uci commit dhcp + fi fi if [ -f "/etc/init.d/podkop" ]; then printf "\033[32;1mPodkop is already installed. Just upgrade it? (y/n)\033[0m\n"