X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/4ab4dc8ed81fbcbe398e9d142096e1876b11a7c0..29791a765cc2ffc02bfdc721f950205669f06c2a:/package/base-files/files/bin/ipcalc.sh diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh index e8efa6b96..d6ef16870 100755 --- a/package/base-files/files/bin/ipcalc.sh +++ b/package/base-files/files/bin/ipcalc.sh @@ -1,16 +1,46 @@ #!/bin/sh -awk -f /usr/lib/common.awk -f - $* <limit) end=limit @@ -20,13 +50,13 @@ BEGIN { print "BROADCAST="int2ip(broadcast) print "NETWORK="int2ip(network) print "PREFIX="32-bitcount(compl(netmask)) - + # range calculations: # ipcalc - + if (ARGC > 3) { print "START="int2ip(start) - print "END="int2ip(end-1) + print "END="int2ip(end) } } EOF