[packages] djbdns: use network.sh to find ip addresses

git-svn-id: svn://svn.openwrt.org/openwrt/packages@31965 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-05-29 00:54:02 +00:00
parent 8d8315f76a
commit db4d0eb42e
6 changed files with 20 additions and 25 deletions

View 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/

View 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

View 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

View 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

View 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

View 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