Mail archive
alpine-aports

[alpine-aports] [PATCH] Added user and group radvd.pre-install and copied sample to /etc/radvd.conf

From: sillysausage <sillysausage_at_privatedemail.net>
Date: Fri, 27 Nov 2015 02:01:06 +1030

---
 main/radvd/APKBUILD          | 8 ++++++--
 main/radvd/radvd.pre-install | 5 +++++
 2 files changed, 11 insertions(+), 2 deletions(-)
 create mode 100644 main/radvd/radvd.pre-install
diff --git a/main/radvd/APKBUILD b/main/radvd/APKBUILD
index e7dd838..b187670 100644
--- a/main/radvd/APKBUILD
+++ b/main/radvd/APKBUILD
_at_@ -2,15 +2,17 @@
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=radvd
 pkgver=2.11
-pkgrel=0
+pkgrel=1
 pkgdesc="A Router Advertisement daemon"
+pkgusers="radvd"
+pkggroups="radvd"
 url="http://www.litech.org/radvd/"
 arch="all"
 license="BSD with advertising"
 depends=""
 depends_dev=""
 makedepends="flex bison libdaemon-dev linux-headers"
-install=""
+install="$pkgname.pre-install"
 subpackages="$pkgname-doc"
 source="http://www.litech.org/radvd/dist/radvd-$pkgver.tar.gz
 	radvd-1.1-gnu-source.patch
_at_@ -52,6 +54,8 @@ package() {
 		|| return 1
 	install -Dm644 "$srcdir"/radvd.confd "$pkgdir"/etc/conf.d/radvd \
 		|| return 1
+	install -Dm400  -o radvd -g radvd "$_builddir"/radvd.conf.example "$pkgdir"/etc/radvd.conf \
+		|| return 1
 }
 
 md5sums="57fc6021f6a5e5472e455937685472a3  radvd-2.11.tar.gz
diff --git a/main/radvd/radvd.pre-install b/main/radvd/radvd.pre-install
new file mode 100644
index 0000000..cc06c7d
--- /dev/null
+++ b/main/radvd/radvd.pre-install
_at_@ -0,0 +1,5 @@
+#!/bin/sh
+addgroup -S radvd 2>/dev/null
+adduser -S -s /sbin/nologin -D -H -G radvd \
+	-g "Router advertisement (radvd) user" radvd 2>/dev/null
+exit 0
-- 
2.4.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Nov 27 2015 - 02:01:06 GMT