From: Tim Yardley Date: Tue, 21 Nov 2006 17:05:26 +0000 (+0000) Subject: rename ipcalc to ipcalc.sh and change known calls to it. this prevents the confusion... X-Git-Tag: whiterussian_0.9~64 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=91a484709e3e0cb7f48ac19813a969c79ede4d2a;p=openwrt%2Fsvn-archive%2Fopenwrt.git rename ipcalc to ipcalc.sh and change known calls to it. this prevents the confusion with the busybox builtin of ipcalc if enabled SVN-Revision: 5607 --- diff --git a/openwrt/package/base-files/default/bin/ipcalc b/openwrt/package/base-files/default/bin/ipcalc deleted file mode 100755 index e8efa6b96c..0000000000 --- a/openwrt/package/base-files/default/bin/ipcalc +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -awk -f /usr/lib/common.awk -f - $* <limit) end=limit - - print "IP="int2ip(ipaddr) - print "NETMASK="int2ip(netmask) - 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) - } -} -EOF diff --git a/openwrt/package/base-files/default/bin/ipcalc.sh b/openwrt/package/base-files/default/bin/ipcalc.sh new file mode 100755 index 0000000000..e8efa6b96c --- /dev/null +++ b/openwrt/package/base-files/default/bin/ipcalc.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +awk -f /usr/lib/common.awk -f - $* <limit) end=limit + + print "IP="int2ip(ipaddr) + print "NETMASK="int2ip(netmask) + 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) + } +} +EOF diff --git a/openwrt/package/base-files/default/etc/init.d/rcS b/openwrt/package/base-files/default/etc/init.d/rcS index d93c81224c..02f665877b 100755 --- a/openwrt/package/base-files/default/etc/init.d/rcS +++ b/openwrt/package/base-files/default/etc/init.d/rcS @@ -1,6 +1,6 @@ #!/bin/sh syslog_ip=$(nvram get log_ipaddr) -eval $(ipcalc "$syslog_ip") +eval $(ipcalc.sh "$syslog_ip") [ "$syslog_ip" = "$IP" ] || syslog_ip="" syslogd -C 16 ${syslog_ip:+-L -R $syslog_ip} klogd diff --git a/openwrt/package/dnsmasq/files/S60dnsmasq b/openwrt/package/dnsmasq/files/S60dnsmasq index 1699659ea6..2556a9c87e 100755 --- a/openwrt/package/dnsmasq/files/S60dnsmasq +++ b/openwrt/package/dnsmasq/files/S60dnsmasq @@ -18,7 +18,7 @@ udhcpc -n -q -R -s /bin/true -i $ifname >&- || { start=$(nvram get dhcp_start) num=$(nvram get dhcp_num) - eval $(ipcalc $ipaddr $netmask ${start:-100} ${num:-150}) + eval $(ipcalc.sh $ipaddr $netmask ${start:-100} ${num:-150}) lease=$(nvram get dhcp_lease) # and pass the args via the commandline