~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH] openrc service script added for rdnssd

Details
Message ID
<20190824175336.17071-1-ahmedbilal96@gmail.com>
DKIM signature
missing
Download raw message
Patch: +32 -1
From: Ahmed Bilal Khalid <ahmedbilal96@gmail.com>

---
 testing/ndisc6/APKBUILD  |  9 ++++++++-
 testing/ndisc6/rdnssd.rc | 24 ++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 testing/ndisc6/rdnssd.rc

diff --git a/testing/ndisc6/APKBUILD b/testing/ndisc6/APKBUILD
index 39015e02e7..25e59ab96a 100644
--- a/testing/ndisc6/APKBUILD
+++ b/testing/ndisc6/APKBUILD
@@ -12,6 +12,8 @@ makedepends="linux-headers"
subpackages="$pkgname-doc"
source="https://www.remlab.net/files/ndisc6/ndisc6-$pkgver.tar.bz2
	remove-undef-gnu-source.patch
	
	rdnssd.rc
	"
options="suid"

@@ -30,8 +32,13 @@ check() {
}

package() {
	echo $srcdir
	make DESTDIR="$pkgdir" install
	install -D -m755 "$srcdir"/rdnssd.rc \
		"$pkgdir"/etc/init.d/rdnssd
}

sha512sums="6f6cd939fb7079518db5c1bcd11353c722237d7735d229f9fd20d03e9f16b1ddf07c7c78c91364886148f2a82d6805eafe7e27da6b4e7c99b111603ec5fab842  ndisc6-1.0.4.tar.bz2
d70c74f965308afbfc266071ec0d073d59cfd42f250e27c8f4f3e1c7b849a6bb9226407e74af30366d348e4213c7497791e8f2edc7b903703e611c036c250644  remove-undef-gnu-source.patch"
d70c74f965308afbfc266071ec0d073d59cfd42f250e27c8f4f3e1c7b849a6bb9226407e74af30366d348e4213c7497791e8f2edc7b903703e611c036c250644  remove-undef-gnu-source.patch
a864ddd01a8fb15eecf66fdef856a83e1eaf46fdcabdb1bf6302dd86ea797eb54d4c29d34cfafac21c0c160c31974aaac1c1135ad833776cf7842b30119541d1  rdnssd.rc
"
diff --git a/testing/ndisc6/rdnssd.rc b/testing/ndisc6/rdnssd.rc
new file mode 100644
index 0000000000..cb253ffe4e
--- /dev/null
+++ b/testing/ndisc6/rdnssd.rc
@@ -0,0 +1,24 @@
#!/sbin/openrc-run
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	need localmount
	before net
	use logger
}

start() {
	ebegin "Starting rdnssd"
	start-stop-daemon --start --quiet --exec /usr/sbin/rdnssd -- -u root -r /etc/resolv.conf
	eend $?
}

stop() {
	ebegin "Stopping rdnssd"
	start-stop-daemon --stop --quiet --pidfile /var/run/rdnssd.pid
	if [ -x /sbin/resolvconf ]; then 
 		/sbin/resolvconf -f -d rdnssd || true
 	fi
	eend $?
} 
-- 
2.22.0
Details
Message ID
<BWI5LI8RDI5X.1KC8KQZYTK861@Impreza>
In-Reply-To
<20190824175336.17071-1-ahmedbilal96@gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Sat Aug 24, 2019 at 10:53 PM  wrote:
> From: Ahmed Bilal Khalid <ahmedbilal96@gmail.com>
> 
> @@ -0,0 +1,24 @@
> +#!/sbin/openrc-run
> +# Copyright 1999-2008 Gentoo Foundation
> +# Distributed under the terms of the GNU General Public License v2

would be nice to have name= and description= be added.

> +
> +depend() {
> +	need localmount
> +	before net
> +	use logger
> +}
> +
> +start() {
> +	ebegin "Starting rdnssd"
> +	start-stop-daemon --start --quiet --exec /usr/sbin/rdnssd -- -u root -r /etc/resolv.conf
> +	eend $?
> +}
> +
> +stop() {
> +	ebegin "Stopping rdnssd"
> +	start-stop-daemon --stop --quiet --pidfile /var/run/rdnssd.pid
> +	if [ -x /sbin/resolvconf ]; then 
> + 		/sbin/resolvconf -f -d rdnssd || true
> + 	fi

indentation seems unleved here

> +	eend $?
> +} 
> -- 
> 2.22.0

Needs to bump pkgrel for your changes to take effect
Milan P. Stanić <mps@arvanta.net>
Details
Message ID
<20190824212604.GA20757@arya.arvanta.net>
In-Reply-To
<20190824175336.17071-1-ahmedbilal96@gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Sat, 2019-08-24 at 22:53, ahmedbilal96@gmail.com wrote:
> From: Ahmed Bilal Khalid <ahmedbilal96@gmail.com>
[...]
>  subpackages="$pkgname-doc"

$pkgname-openrc should be added to subpackages

>  source="https://www.remlab.net/files/ndisc6/ndisc6-$pkgver.tar.bz2
>  	remove-undef-gnu-source.patch
> +	
> +	rdnssd.rc

File name should end with initd, i.e. rdnssd.initd

>  	"
[...]
Reply to thread Export thread (mbox)