summaryrefslogtreecommitdiff
path: root/extra/dnsmasq
diff options
context:
space:
mode:
Diffstat (limited to 'extra/dnsmasq')
-rw-r--r--extra/dnsmasq/PKGBUILD6
-rwxr-xr-xextra/dnsmasq/rc.dnsmasq13
2 files changed, 15 insertions, 4 deletions
diff --git a/extra/dnsmasq/PKGBUILD b/extra/dnsmasq/PKGBUILD
index 3c68a1a8b..1b584820d 100644
--- a/extra/dnsmasq/PKGBUILD
+++ b/extra/dnsmasq/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 140772 2011-10-19 01:14:39Z dreisner $
+# $Id: PKGBUILD 140810 2011-10-19 16:21:22Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=dnsmasq
pkgver=2.59
-pkgrel=1
+pkgrel=2
pkgdesc="Lightweight, easy to configure DNS forwarder and DHCP server"
url="http://www.thekelleys.org.uk/dnsmasq/doc.html"
arch=('i686' 'x86_64' 'mips64el')
@@ -21,7 +21,7 @@ source=("http://www.thekelleys.org.uk/$pkgname/$pkgname-$pkgver.tar.gz"
'dnsmasq.service')
md5sums=('29d43f182ecad06d64b3598c02380a80'
'66479e99123faeab83ebaed709ef95b5'
- '818c122ea4d81868a75afad109411170'
+ '9f180cc236808bbd02ca8652fd2e8217'
'f329d86f8ba1cd85f9b6ee59e0ce3791')
build() {
diff --git a/extra/dnsmasq/rc.dnsmasq b/extra/dnsmasq/rc.dnsmasq
index 2ded33695..0ce736ba9 100755
--- a/extra/dnsmasq/rc.dnsmasq
+++ b/extra/dnsmasq/rc.dnsmasq
@@ -4,6 +4,17 @@
. /etc/rc.d/functions
. /etc/conf.d/dnsmasq
+checkconfig() {
+ local testout
+
+ if ! testout=$(/usr/sbin/dnsmasq --test 2>&1); then
+ echo "$testout"
+ return 1
+ fi
+
+ return 0
+}
+
pidfile=/run/dnsmasq.pid
if [[ -r $pidfile ]]; then
read -r PID < "$pidfile"
@@ -17,7 +28,7 @@ fi
case $1 in
start)
stat_busy "Starting DNS/DHCP daemon"
- if [[ -z $PID ]] && /usr/sbin/dnsmasq --test &&
+ if [[ -z $PID ]] && checkconfig &&
/usr/sbin/dnsmasq "--user=${DNSMASQ_USER:-nobody}" \
"--pid-file=$pidfile" \
"${DNSMASQ_OPTS[@]}"; then