aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq/files
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2011-11-07 22:58:45 +0000
committerNicolas Thill <nico@openwrt.org>2011-11-07 22:58:45 +0000
commit4f5cbf9f9b8e1f8816fd50af98f63b417023fa63 (patch)
tree8b436eb6f57abf6e3bf601c4369490a0db4b17c9 /package/dnsmasq/files
parente4a8f5abe631ca557c95456eae1dfe131cee75c0 (diff)
downloadupstream-4f5cbf9f9b8e1f8816fd50af98f63b417023fa63.tar.gz
upstream-4f5cbf9f9b8e1f8816fd50af98f63b417023fa63.tar.bz2
upstream-4f5cbf9f9b8e1f8816fd50af98f63b417023fa63.zip
package/dnsmasq: use new service wrapper
SVN-Revision: 28837
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r--package/dnsmasq/files/dnsmasq.init15
1 files changed, 9 insertions, 6 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 3d9060d81d..80ab250baa 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -2,6 +2,9 @@
# Copyright (C) 2007 OpenWrt.org
START=60
+
+SERVICE_USE_PID=1
+
DNS_SERVERS=""
DOMAIN=""
@@ -397,7 +400,7 @@ start() {
config_foreach dhcp_add dhcp
config_foreach dhcp_cname_add cname
- /usr/sbin/dnsmasq $args && {
+ service_start /usr/sbin/dnsmasq $args && {
rm -f /tmp/resolv.conf
[ -n "$DOMAIN" ] && echo "search $DOMAIN" >> /tmp/resolv.conf
DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
@@ -408,10 +411,10 @@ start() {
}
stop() {
- [ -f /tmp/resolv.conf ] && {
- rm -f /tmp/resolv.conf
- ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ service_stop /usr/sbin/dnsmasq && {
+ [ -f /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
}