Ddns services not running using luci-app-ddns and ddns-scripts-cloudflare

Found the issue.

This is the script used for all ddns.

root@GL-MT6000:~# cat /etc/init.d/ddns
#!/bin/sh /etc/rc.common
set -x
START=95
STOP=10

PROG=/usr/lib/ddns/dynamic_dns_updater.sh
bypassvpn=`uci -q get vpnpolicy.global.service_policy`

if [ $bypassvpn = 1 ];then
	PROG="sudo -g nonevpn /usr/lib/ddns/dynamic_dns_updater.sh"
else
	PROG=/usr/lib/ddns/dynamic_dns_updater.sh
fi



boot() {
	return 0
}

reload() {
	$PROG -- reload
	return 0
}

restart() {
	$PROG -- stop
	sleep 1 # give time to shutdown
	enable=`uci -q get ddns.glddns.enabled`
	if [ "$enable" = 1 ];then
		$PROG -- start
	fi
}

start() {
	enable=`uci -q get ddns.glddns.enabled`
	if [ "$enable" = 1 ];then
		$PROG -- start
	fi
}

stop() {
	$PROG -- stop
	return 0
}

The start function doesn't execute because uci -q get ddns.glddns.enabled returns nothing because I'm not using glddns. But even when I have enabled glddns that command still returns nothing.

So to workaround this for now I added /usr/lib/ddns/dynamic_dns_updater.sh -- start to startup. After a reboot I can see the ddns services are running.

Device: Flint 2
Firmware: 4.6.0 Beta 3 but I've experienced this on all firmware I've tried so far.