[packages] djbdns: use network.sh to find ip addresses
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 29 May 2012 00:54:02 +0000 (00:54 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 29 May 2012 00:54:02 +0000 (00:54 +0000)
SVN-Revision: 31965

net/djbdns/Makefile
net/djbdns/files/axfrdns.init
net/djbdns/files/dnscache.init
net/djbdns/files/rbldns.init
net/djbdns/files/tinydns.init
net/djbdns/files/walldns.init

index bd10145c7b04b8242f668d461ca0d5a87aef40d8..b47450c7ce4df6328607647bd03fe526af1a7165 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2011 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
 # Original port by FreeWRT project.
 #
 # 2007     Alexander Tsvyashchenko  Adapted FreeWRT port for OpenWRT (Trac ticket 2497)
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=djbdns
 PKG_VERSION:=1.05
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
 PKG_SOURCE_URL:=http://cr.yp.to/djbdns/
index b797141b0296de153fe8c2a6564bc9a027de54e3..a40f93a8bb212243e223aa269499a90a4eafa4fb 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
 #
 # version 20090401 jhalfmoon
 
@@ -46,9 +46,8 @@ start_daemon() {
 # Unset AXFR if it is empty
     [ -z $AXFR ] && export -n AXFR
 # Translate listening interfaces to ip addresses
-    include /lib/network
-    scan_interfaces
-    config_get IP "$iface" ipaddr
+    . /lib/functions/network.sh
+    network_get_ipaddr IP "$iface" || return 1
     export ROOT
     if [ "$DEBUG" == 1 ] ; then
         $DAEMON -vDRHl0 -c40 -b10 -x $ROOT/tcp.cdb -- $IP 53 $APP
index 8ba964596cd3c6ab9870554d64df3cf8cc058dee..97f8ee9d317453696cb155e753be2e96ebcbbfa7 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
 
 # Preferably start dnscache after udhcpd/dnsmasq, to be sure /etc/resolv.conf is set correctly. dnsmasq is at S60, so dnscache is put at S65 as seen below. If /etc/resolv.conf is not used, then dnscache may be started at S47, just after the firewall has been set up.
 START=65
@@ -55,11 +55,10 @@ start_dnscache() {
         config_list_foreach   "$cfg" "ignoreip" append_ignore
     fi
 # Add some interface network addresses to list of allowed IP addresses (assumes /24 networks)
-    include /lib/network
-    scan_interfaces
+    . /lib/functions/network.sh
     if [ -n "$defaultallowif" ] ; then
         for myinterface in `echo $defaultallowif`; do
-            config_get addr $myinterface ipaddr
+            network_get_ipaddr addr $myinterface || continue
             # the next line strips the last octet from the ip address
             addr=`echo $addr|sed 's/.[0-9]\+$//'`
             touch $ROOT/ip/$addr
@@ -67,9 +66,9 @@ start_dnscache() {
         done
     fi
 # Translate listen interface names to IP addresses
-    config_get IP "$iface" ipaddr
-# Translante send interface name to an IP address
-    config_get IPSEND "$ifacesend" ipaddr
+    network_get_ipaddr IP "$iface"
+# Translate send interface name to an IP address
+    network_get_ipaddr IPSEND "$ifacesend"
 # Unset HIDETTL if equal to 0
     if [ "$HIDETTL" == "0" ] ; then
         export -n HIDETTL
index 0c259c63936c6e86cd2e54f8e5ed9fa922e5fbef..dfe98f46824031d05911c6a468f5b5715cbf56fd 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
 #
 # version 20090401 jhalfmoon
 
@@ -40,9 +40,8 @@ start_daemon() {
 # Unset BASE if it is empty
     [ -z $BASE ] && export -n BASE
 # Translate listening interfaces to ip addresses
-    include /lib/network
-    scan_interfaces
-    config_get IP "$iface" ipaddr
+    . /lib/functions/network.sh
+    network_get_ipaddr IP "$iface"
     export ROOT
     if [ "$DEBUG" == 1 ] ; then
             $DAEMON
index 30c5d6fea56b338702af40d4916bd9344dfff977..bff119d596c1cda5b4e79a3a00ac7143c432c51a 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
 #
 # version 20090401 jhalfmoon
 
@@ -35,10 +35,9 @@ start_daemon() {
     local cfg="$1"
     config_get logging "$cfg" logging
     config_get iface   "$cfg" interface
-    include /lib/network
-    scan_interfaces
 # Translate listening interfaces to ip addresses
-    config_get IP "$iface" ipaddr
+    . /lib/functions/network.sh
+    network_get_ipaddr IP "$iface"
     export ROOT
     if [ "$DEBUG" == 1 ] ; then
         $DAEMON
index d5d714ff3bc10c0f51a29bab708847931f1671c2..9d4f7731a9c95e36f16b847ae48a89a33437a4e3 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
 #
 # version 20090401 jhalfmoon
 
@@ -34,9 +34,8 @@ start_daemon() {
     config_get logging "$cfg" logging
     config_get iface   "$cfg" interface
 # Translate listening interfaces to ip addresses
-    include /lib/network
-    scan_interfaces
-    config_get IP "$iface" ipaddr
+    . /lib/functions/network.sh
+    network_get_ipaddr IP "$iface"
     export ROOT
     if [ "$DEBUG" == 1 ] ; then
         $DAEMON