Xentrk
Part of the Furniture
I was pondering the same thing. If nvram get dns_local returns null, then check for dns_local_cache and set to 1.That means if dns_local_cache is present, the dns_local can be ignored. No need to check firmware version. Or would one have to check for @john9527 s fork that may have a differing nvram parameter?
I found this method to compare integer values. Requires the entware package bc though:
Code:
#!/bin/sh
buildno=$(nvram get buildno)
testbuildno=384.11
ifbc () { test $(echo "$@" | bc -l ) -ne 0; }
ifbc "$testbuildno > $buildno" && echo "true, it's greater" || echo "no, it's less or ="