[PATCH] ahcpd: fix ticket 3550
Signed-off-by: Gabriel Kerneis <kerneis@pps.jussieu.fr> git-svn-id: svn://svn.openwrt.org/openwrt/packages@15266 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
db57b66675
commit
e242637f78
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=ahcpd
|
PKG_NAME:=ahcpd
|
||||||
PKG_VERSION:=0.5
|
PKG_VERSION:=0.5
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
|
PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
config ahcpd
|
config ahcpd
|
||||||
option interfaces "wl0"
|
option interfaces "wl0"
|
||||||
# Comment out to actually disable, see ticket 3550
|
|
||||||
option no_dns false
|
option no_dns false
|
||||||
option no_ipv4 true
|
option no_ipv4 true
|
||||||
|
@ -7,8 +7,8 @@ pidfile=/var/run/ahcpd.pid
|
|||||||
ahcpd_config() {
|
ahcpd_config() {
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
config_get interfaces "$cfg" interfaces
|
config_get interfaces "$cfg" interfaces
|
||||||
config_get no_ipv4 "$cfg" no_ipv4
|
config_get_bool no_ipv4 "$cfg" no_ipv4 0
|
||||||
config_get no_dns "$cfg" no_dns
|
config_get_bool no_dns "$cfg" no_dns 0
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
@ -16,6 +16,12 @@ start() {
|
|||||||
config_foreach ahcpd_config ahcpd
|
config_foreach ahcpd_config ahcpd
|
||||||
mkdir -p /var/lib
|
mkdir -p /var/lib
|
||||||
[ -r /usr/lib/ahcp/ahcp.dat ] && authority="-a /usr/lib/ahcp/ahcp.dat"
|
[ -r /usr/lib/ahcp/ahcp.dat ] && authority="-a /usr/lib/ahcp/ahcp.dat"
|
||||||
|
if [ "$no_ipv4" -eq 0 ]; then
|
||||||
|
unset no_ipv4
|
||||||
|
fi
|
||||||
|
if [ "$no_dns" -eq 0 ]; then
|
||||||
|
unset no_dns
|
||||||
|
fi
|
||||||
if [ -e $pidfile ] ; then
|
if [ -e $pidfile ] ; then
|
||||||
echo "$pidfile exists -- not starting ahcpd." >&2
|
echo "$pidfile exists -- not starting ahcpd." >&2
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user