aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-01-19 09:12:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-01-19 09:14:19 +0000
commit1e466a24c57acb162cbc1743a54d25def47c26c2 (patch)
treea3051cd30cbe024c2fd1f9e5095d817b8ab46323 /main
parentcfed76043a5f2cfbf62850c68ec439257d4a8c59 (diff)
downloadaports-1e466a24c57acb162cbc1743a54d25def47c26c2.tar.bz2
aports-1e466a24c57acb162cbc1743a54d25def47c26c2.tar.xz
main/dnsmasq: replace opts in init.d script and create user/group
While we were here we create and enable the user "dnsmasq". ref #943
Diffstat (limited to 'main')
-rw-r--r--main/dnsmasq/APKBUILD7
-rw-r--r--main/dnsmasq/dnsmasq.confd2
-rw-r--r--main/dnsmasq/dnsmasq.initd13
-rw-r--r--main/dnsmasq/dnsmasq.pre-install5
l---------main/dnsmasq/dnsmasq.pre-upgrade1
5 files changed, 16 insertions, 12 deletions
diff --git a/main/dnsmasq/APKBUILD b/main/dnsmasq/APKBUILD
index ba6d5ebf7d..a7aed4d2b0 100644
--- a/main/dnsmasq/APKBUILD
+++ b/main/dnsmasq/APKBUILD
@@ -1,12 +1,13 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dnsmasq
pkgver=2.59
-pkgrel=0
+pkgrel=1
pkgdesc="Small forwarding DNS server"
url="http://www.thekelleys.org.uk/dnsmasq/"
arch="all"
license="GPL-2"
depends=
+install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-doc"
source="http://www.thekelleys.org.uk/dnsmasq/$pkgname-$pkgver.tar.gz
$pkgname.initd
@@ -37,5 +38,5 @@ package() {
install dnsmasq.conf.example "$pkgdir"/etc/dnsmasq.conf
}
md5sums="b5757ef2d7b651748eeebb88af29d7d6 dnsmasq-2.59.tar.gz
-db46459322a0c7d9ce4f68251fd265c4 dnsmasq.initd
-5990c2d2cb92209feacf8f3a5a7d0831 dnsmasq.confd"
+006fed857314053b870ff1927c12ae78 dnsmasq.initd
+16985abb08c8e11f85e38b37ea3863a4 dnsmasq.confd"
diff --git a/main/dnsmasq/dnsmasq.confd b/main/dnsmasq/dnsmasq.confd
index 47826dd508..0e94463074 100644
--- a/main/dnsmasq/dnsmasq.confd
+++ b/main/dnsmasq/dnsmasq.confd
@@ -1,4 +1,4 @@
# /etc/conf.d/dnsmasq: config file for /etc/init.d/dnsmasq
# See the dnsmasq(8) man page for possible options to put here.
-DNSMASQ_OPTS=""
+DNSMASQ_OPTS="--user=dnsmasq --group=dnsmasq"
diff --git a/main/dnsmasq/dnsmasq.initd b/main/dnsmasq/dnsmasq.initd
index 3f33d89865..52e21ba949 100644
--- a/main/dnsmasq/dnsmasq.initd
+++ b/main/dnsmasq/dnsmasq.initd
@@ -1,14 +1,15 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq-init,v 1.13 2008/01/29 15:06:30 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq-init-r1,v 1.2 2011/12/04 10:28:47 swegener Exp $
-opts="reload"
+extra_started_commands="reload"
depend() {
provide dns
need localmount net
- after bootmisc firewall
+ after bootmisc
+ use logger
}
start() {
@@ -28,10 +29,6 @@ stop() {
reload() {
ebegin "Reloading ${SVCNAME}"
- if ! service_started "${SVCNAME}" ; then
- eend 1 "${SVCNAME} is not started"
- return 1
- fi
start-stop-daemon --stop --oknodo --signal HUP \
--exec /usr/sbin/dnsmasq --pidfile /var/run/dnsmasq.pid
eend $?
diff --git a/main/dnsmasq/dnsmasq.pre-install b/main/dnsmasq/dnsmasq.pre-install
new file mode 100644
index 0000000000..8502b6e79a
--- /dev/null
+++ b/main/dnsmasq/dnsmasq.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup dnsmasq 2>/dev/null
+adduser -S -H -h /dev/null -s /bin/false -G dnsmasq -D dnsmasq 2>/dev/null
+exit 0
diff --git a/main/dnsmasq/dnsmasq.pre-upgrade b/main/dnsmasq/dnsmasq.pre-upgrade
new file mode 120000
index 0000000000..b456897a9a
--- /dev/null
+++ b/main/dnsmasq/dnsmasq.pre-upgrade
@@ -0,0 +1 @@
+dnsmasq.pre-install \ No newline at end of file