diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-14 20:45:26 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-14 21:07:08 +0100 |
commit | d63e3f0cc0a3d3a20e1a39b67b4ae6fcdfafec48 (patch) | |
tree | 77d17896c7f5bff1f15f5ea96f828fc1fe4f6016 /main | |
parent | 27b1481c2bb1394613f25acdc29241fdff707efd (diff) | |
download | aports-d63e3f0cc0a3d3a20e1a39b67b4ae6fcdfafec48.tar.bz2 aports-d63e3f0cc0a3d3a20e1a39b67b4ae6fcdfafec48.tar.xz |
main/dnsmasq: improve runscript, check config before starting
Diffstat (limited to 'main')
-rw-r--r-- | main/dnsmasq/APKBUILD | 12 | ||||
-rw-r--r-- | main/dnsmasq/dnsmasq.initd | 17 |
2 files changed, 17 insertions, 12 deletions
diff --git a/main/dnsmasq/APKBUILD b/main/dnsmasq/APKBUILD index 8b863d5587..ece69d88d6 100644 --- a/main/dnsmasq/APKBUILD +++ b/main/dnsmasq/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=dnsmasq pkgver=2.76 -pkgrel=1 +pkgrel=3 pkgdesc="A lightweight DNS, DHCP, RA, TFTP and PXE server" url="http://www.thekelleys.org.uk/dnsmasq/" arch="all" @@ -44,15 +44,7 @@ package() { install -d -m755 "$pkgdir"/etc/dnsmasq.d } -md5sums="6610f8233ca89b15a1bb47c788ffb84f dnsmasq-2.76.tar.gz -f8ac1192164af3dfbc06499f53aa4831 dnsmasq.initd -16985abb08c8e11f85e38b37ea3863a4 dnsmasq.confd -9a224e79a0be715bee519af93da0a81a uncomment-conf-dir.patch" -sha256sums="777c4762d2fee3738a0380401f2d087b47faa41db2317c60660d69ad10a76c32 dnsmasq-2.76.tar.gz -deeea140ea362d330fd509755556f3e1322f37b3dbe91f01003c4d1772220264 dnsmasq.initd -51c0672a70d5d6793d295d82db666d372fb081e8627318f67c88e48d08d254b5 dnsmasq.confd -c1ec96b6001c5873992eb612a560995b2a8be441fe23ce6bc52119c651b2943c uncomment-conf-dir.patch" sha512sums="c22627a8d864671096d3b3428ec4f879b513e1f1e7f79be3ab89444c56234e748fbfa6b6b4f9e521984fea95d363f4aa2ca6243f0dfc12ffb74bed0648ae21c5 dnsmasq-2.76.tar.gz -6927ba31be547f02720093c9bbf3c3c978a71882849c7ed779d0239cc7629ca7ea5ed55acd7ef104f2853677ee9c746b6fa2b28bff03430bf8d5cef103b29b96 dnsmasq.initd +1ab7a44ac19bdaf15ca995e236409f9010b3092155add87cc6a919452423919e710525de7da8f01315729ce56db6ba2584567ba67c787d4c3d64a366572331c4 dnsmasq.initd 9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8 dnsmasq.confd d01077f39e1240041a6700137810f254daf683b2d58dafecb6b162e94d694992e57d45964a57993b298f97c2b589eedcf9fb1506692730a38b7f06b5f55ba8d8 uncomment-conf-dir.patch" diff --git a/main/dnsmasq/dnsmasq.initd b/main/dnsmasq/dnsmasq.initd index 4e035c2dd9..c92853416d 100644 --- a/main/dnsmasq/dnsmasq.initd +++ b/main/dnsmasq/dnsmasq.initd @@ -2,6 +2,9 @@ description="A lightweight DNS, DHCP, RA, TFTP and PXE server" +extra_commands="checkconfig" +description_checkconfig="Check configuration syntax" + extra_started_commands="reload" description_reload="Clear cache and reload hosts files" @@ -19,11 +22,21 @@ depend() { } start_pre() { + $command --test 2>/dev/null || $command --test || return 1 checkpath -m 0644 -o dnsmasq:dnsmasq -f /var/lib/misc/dnsmasq.leases } reload() { - ebegin "Reloading $SVCNAME" - kill -HUP "$(cat $pidfile)" + ebegin "Reloading $RC_SVCNAME" + + start_pre || return 1 + start-stop-daemon --signal HUP --pidfile "$pidfile" + eend $? +} + +checkconfig() { + ebegin "Checking $RC_SVCNAME configuration" + + $command --test eend $? } |