[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:
parent
8d8315f76a
commit
db4d0eb42e
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2007-2011 OpenWrt.org
|
# Copyright (C) 2007-2012 OpenWrt.org
|
||||||
# Original port by FreeWRT project.
|
# Original port by FreeWRT project.
|
||||||
#
|
#
|
||||||
# 2007 Alexander Tsvyashchenko Adapted FreeWRT port for OpenWRT (Trac ticket 2497)
|
# 2007 Alexander Tsvyashchenko Adapted FreeWRT port for OpenWRT (Trac ticket 2497)
|
||||||
@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=djbdns
|
PKG_NAME:=djbdns
|
||||||
PKG_VERSION:=1.05
|
PKG_VERSION:=1.05
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=7
|
||||||
|
|
||||||
PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
|
PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
|
||||||
PKG_SOURCE_URL:=http://cr.yp.to/djbdns/
|
PKG_SOURCE_URL:=http://cr.yp.to/djbdns/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2007 OpenWrt.org
|
# Copyright (C) 2007-2012 OpenWrt.org
|
||||||
#
|
#
|
||||||
# version 20090401 jhalfmoon
|
# version 20090401 jhalfmoon
|
||||||
|
|
||||||
@ -46,9 +46,8 @@ start_daemon() {
|
|||||||
# Unset AXFR if it is empty
|
# Unset AXFR if it is empty
|
||||||
[ -z $AXFR ] && export -n AXFR
|
[ -z $AXFR ] && export -n AXFR
|
||||||
# Translate listening interfaces to ip addresses
|
# Translate listening interfaces to ip addresses
|
||||||
include /lib/network
|
. /lib/functions/network.sh
|
||||||
scan_interfaces
|
network_get_ipaddr IP "$iface" || return 1
|
||||||
config_get IP "$iface" ipaddr
|
|
||||||
export ROOT
|
export ROOT
|
||||||
if [ "$DEBUG" == 1 ] ; then
|
if [ "$DEBUG" == 1 ] ; then
|
||||||
$DAEMON -vDRHl0 -c40 -b10 -x $ROOT/tcp.cdb -- $IP 53 $APP
|
$DAEMON -vDRHl0 -c40 -b10 -x $ROOT/tcp.cdb -- $IP 53 $APP
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/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.
|
# 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
|
START=65
|
||||||
@ -55,11 +55,10 @@ start_dnscache() {
|
|||||||
config_list_foreach "$cfg" "ignoreip" append_ignore
|
config_list_foreach "$cfg" "ignoreip" append_ignore
|
||||||
fi
|
fi
|
||||||
# Add some interface network addresses to list of allowed IP addresses (assumes /24 networks)
|
# Add some interface network addresses to list of allowed IP addresses (assumes /24 networks)
|
||||||
include /lib/network
|
. /lib/functions/network.sh
|
||||||
scan_interfaces
|
|
||||||
if [ -n "$defaultallowif" ] ; then
|
if [ -n "$defaultallowif" ] ; then
|
||||||
for myinterface in `echo $defaultallowif`; do
|
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
|
# the next line strips the last octet from the ip address
|
||||||
addr=`echo $addr|sed 's/.[0-9]\+$//'`
|
addr=`echo $addr|sed 's/.[0-9]\+$//'`
|
||||||
touch $ROOT/ip/$addr
|
touch $ROOT/ip/$addr
|
||||||
@ -67,9 +66,9 @@ start_dnscache() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
# Translate listen interface names to IP addresses
|
# Translate listen interface names to IP addresses
|
||||||
config_get IP "$iface" ipaddr
|
network_get_ipaddr IP "$iface"
|
||||||
# Translante send interface name to an IP address
|
# Translate send interface name to an IP address
|
||||||
config_get IPSEND "$ifacesend" ipaddr
|
network_get_ipaddr IPSEND "$ifacesend"
|
||||||
# Unset HIDETTL if equal to 0
|
# Unset HIDETTL if equal to 0
|
||||||
if [ "$HIDETTL" == "0" ] ; then
|
if [ "$HIDETTL" == "0" ] ; then
|
||||||
export -n HIDETTL
|
export -n HIDETTL
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2007 OpenWrt.org
|
# Copyright (C) 2007-2012 OpenWrt.org
|
||||||
#
|
#
|
||||||
# version 20090401 jhalfmoon
|
# version 20090401 jhalfmoon
|
||||||
|
|
||||||
@ -40,9 +40,8 @@ start_daemon() {
|
|||||||
# Unset BASE if it is empty
|
# Unset BASE if it is empty
|
||||||
[ -z $BASE ] && export -n BASE
|
[ -z $BASE ] && export -n BASE
|
||||||
# Translate listening interfaces to ip addresses
|
# Translate listening interfaces to ip addresses
|
||||||
include /lib/network
|
. /lib/functions/network.sh
|
||||||
scan_interfaces
|
network_get_ipaddr IP "$iface"
|
||||||
config_get IP "$iface" ipaddr
|
|
||||||
export ROOT
|
export ROOT
|
||||||
if [ "$DEBUG" == 1 ] ; then
|
if [ "$DEBUG" == 1 ] ; then
|
||||||
$DAEMON
|
$DAEMON
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2007 OpenWrt.org
|
# Copyright (C) 2007-2012 OpenWrt.org
|
||||||
#
|
#
|
||||||
# version 20090401 jhalfmoon
|
# version 20090401 jhalfmoon
|
||||||
|
|
||||||
@ -35,10 +35,9 @@ start_daemon() {
|
|||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
config_get logging "$cfg" logging
|
config_get logging "$cfg" logging
|
||||||
config_get iface "$cfg" interface
|
config_get iface "$cfg" interface
|
||||||
include /lib/network
|
|
||||||
scan_interfaces
|
|
||||||
# Translate listening interfaces to ip addresses
|
# Translate listening interfaces to ip addresses
|
||||||
config_get IP "$iface" ipaddr
|
. /lib/functions/network.sh
|
||||||
|
network_get_ipaddr IP "$iface"
|
||||||
export ROOT
|
export ROOT
|
||||||
if [ "$DEBUG" == 1 ] ; then
|
if [ "$DEBUG" == 1 ] ; then
|
||||||
$DAEMON
|
$DAEMON
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2007 OpenWrt.org
|
# Copyright (C) 2007-2012 OpenWrt.org
|
||||||
#
|
#
|
||||||
# version 20090401 jhalfmoon
|
# version 20090401 jhalfmoon
|
||||||
|
|
||||||
@ -34,9 +34,8 @@ start_daemon() {
|
|||||||
config_get logging "$cfg" logging
|
config_get logging "$cfg" logging
|
||||||
config_get iface "$cfg" interface
|
config_get iface "$cfg" interface
|
||||||
# Translate listening interfaces to ip addresses
|
# Translate listening interfaces to ip addresses
|
||||||
include /lib/network
|
. /lib/functions/network.sh
|
||||||
scan_interfaces
|
network_get_ipaddr IP "$iface"
|
||||||
config_get IP "$iface" ipaddr
|
|
||||||
export ROOT
|
export ROOT
|
||||||
if [ "$DEBUG" == 1 ] ; then
|
if [ "$DEBUG" == 1 ] ; then
|
||||||
$DAEMON
|
$DAEMON
|
||||||
|
Loading…
x
Reference in New Issue
Block a user