package/dnsmasq: use new service wrapper
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28837 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
8b21997f14
commit
a13b6db678
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=dnsmasq
|
PKG_NAME:=dnsmasq
|
||||||
PKG_VERSION:=2.58
|
PKG_VERSION:=2.58
|
||||||
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://thekelleys.org.uk/dnsmasq
|
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
# Copyright (C) 2007 OpenWrt.org
|
# Copyright (C) 2007 OpenWrt.org
|
||||||
|
|
||||||
START=60
|
START=60
|
||||||
|
|
||||||
|
SERVICE_USE_PID=1
|
||||||
|
|
||||||
DNS_SERVERS=""
|
DNS_SERVERS=""
|
||||||
DOMAIN=""
|
DOMAIN=""
|
||||||
|
|
||||||
|
@ -397,7 +400,7 @@ start() {
|
||||||
config_foreach dhcp_add dhcp
|
config_foreach dhcp_add dhcp
|
||||||
config_foreach dhcp_cname_add cname
|
config_foreach dhcp_cname_add cname
|
||||||
|
|
||||||
/usr/sbin/dnsmasq $args && {
|
service_start /usr/sbin/dnsmasq $args && {
|
||||||
rm -f /tmp/resolv.conf
|
rm -f /tmp/resolv.conf
|
||||||
[ -n "$DOMAIN" ] && echo "search $DOMAIN" >> /tmp/resolv.conf
|
[ -n "$DOMAIN" ] && echo "search $DOMAIN" >> /tmp/resolv.conf
|
||||||
DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
|
DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
|
||||||
|
@ -408,10 +411,10 @@ start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
[ -f /tmp/resolv.conf ] && {
|
service_stop /usr/sbin/dnsmasq && {
|
||||||
rm -f /tmp/resolv.conf
|
[ -f /tmp/resolv.conf ] && {
|
||||||
ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
|
rm -f /tmp/resolv.conf
|
||||||
|
ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
|
||||||
|
}
|
||||||
}
|
}
|
||||||
service_kill dnsmasq /var/run/dnsmasq.pid
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue