aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-06-12 16:07:45 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-06-12 16:01:26 +0200
commitcf657bf09d01bc67e66fb39ce8ebec1ca93cbec1 (patch)
tree350a8824873c726734372a1c5066d1c04b320a7d /main
parent28850b3a43930dcaba7ce82fa55bb53853cf412d (diff)
downloadaports-cf657bf09d01bc67e66fb39ce8ebec1ca93cbec1.tar.gz
aports-cf657bf09d01bc67e66fb39ce8ebec1ca93cbec1.tar.bz2
aports-cf657bf09d01bc67e66fb39ce8ebec1ca93cbec1.tar.xz
main/nfs-utils: rewrite some init scripts to be more declarative
Diffstat (limited to 'main')
-rw-r--r--main/nfs-utils/APKBUILD10
-rw-r--r--main/nfs-utils/rpc.gssd.initd17
-rw-r--r--main/nfs-utils/rpc.idmapd.initd17
-rw-r--r--main/nfs-utils/rpc.statd.initd26
-rw-r--r--main/nfs-utils/rpc.svcgssd.initd17
5 files changed, 21 insertions, 66 deletions
diff --git a/main/nfs-utils/APKBUILD b/main/nfs-utils/APKBUILD
index 620a420c22..90c4747e77 100644
--- a/main/nfs-utils/APKBUILD
+++ b/main/nfs-utils/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nfs-utils
pkgver=2.3.1
-pkgrel=2
+pkgrel=3
pkgdesc="kernel-mode NFS"
url="http://linux-nfs.org"
arch="all"
@@ -100,11 +100,11 @@ b75c87917d86ce6e0e8b9bc2651e7f77851170b47b2a9c7628475e8aed73e89c858e7030885e2904
f7feb79cfcab0478affb640d1e5ad059757c88d51cc790fd54cde2fd7ed2e3cfd8f7f4c2de993d99da03e8ce3bdfb2750a4cb997b850fe33d0ef76d9b91c9018 nfs.initd
89259b9f0878658d48792b5b2f42b43c966ed098dba1fecf9e07fb0de4aab37ad67655ea8dbcc2361ddab2b5013b2de35a03048a513aaeedf790e4b416a35a54 nfsmount.initd
6e23897885cc33c49d9c7353b456585a1e0c7300822edba81bc48ba4ccc18297adce137260cc0aa9487aa5ef0aab3eecf931532cfa5bd40fd03bc9e0ddacfb28 nfsmount.confd
-d9d7eeebbe153d3c4784112ed6d50734b5619b3315bb1454f8163de2b78ed8f958029a0e1088de58e9b1b8069184aeab2c8f19af4b957b6be25e4f138960aeac rpc.gssd.initd
-f3e88038cb040ffcbca76166f4322d37e39da00d144bc0a17aed4467ab10c6e626fcde6c407d0911d135bfab55622ad2e38ed93788b11459c5882ce60577fb45 rpc.idmapd.initd
+414f2de0b64897b2350666760337683aa4bab612be3e5a3cdd3ac5afa55e498c5cb053430e35b7eb7ed66b93fd66d416d557c2bd8299e3b8b633c7935db6d422 rpc.gssd.initd
+489c1ac59a0d4996056502137d5d57373dda21bfb08d062f21785c8f9fbff3672cff6a19a72061d6f09c1c308c77046043c2b3b28b5fe364120594504f865ef8 rpc.idmapd.initd
3d3fa6e7ae01e27d27d88aba1e307c5293dd1cbc9d555737e03c4f1e17988518f4f1e7f7a38a7337f8e8961e8378cc4611769b04db7368460589a3b218ac6d6b rpc.pipefs.initd
-7f6baea852fff91b88e15e432ba19f9da0a3e3510b6f550b553912cf3887ce176280367b62bcce2a044730a075e4c1f6d7df1a669556d42725dea6e6e8e967ac rpc.statd.initd
-819cce4ae0a0f26bc74ce546e149b98420584240a594c9bb4a0a49413750320bde050866f3753c499425ea8d8df094211fb1f7e020ce281791e1933e1bc6a47f rpc.svcgssd.initd
+a04803606050c0ece59a49cf12d560720e4588973b3806caffe3d410248cc27207c16f186bb624babfe7da1156bc046519dfa0d71333000b816f1ec7576d28f2 rpc.statd.initd
+d5d654927cf867fc3562edfc471b2e9df6b737a080f2f726c9c4f58815c092c3403fbbd1f8779d4f166d2e1022a61a8f756ac418e61317a482db7f075ee5cd64 rpc.svcgssd.initd
bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535 nfs.confd
70f96bb3a465ee0fa857a6e511051ca3ced9f5a5d1e6b8b32eec843a2067f2475d8979c724a3661de0a2b078eef143f55d75ed184d823841d9de5038da91fb91 nfs.exports
85078e2cd38b37a1e6fbaf0e40cf7690f403e71d9c8188d542d12fe56bfc02a49763c7bcc7742691754acc37928468c215db2795bebc29a5dfb052ba08f407bb nfsclient.initd
diff --git a/main/nfs-utils/rpc.gssd.initd b/main/nfs-utils/rpc.gssd.initd
index 445d44c444..d58e20aaae 100644
--- a/main/nfs-utils/rpc.gssd.initd
+++ b/main/nfs-utils/rpc.gssd.initd
@@ -1,23 +1,12 @@
#!/sbin/openrc-run
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+command="/usr/sbin/rpc.gssd"
+command_args="$OPTS_RPC_GSSD"
+
depend() {
use ypbind net
need portmap rpc.pipefs
after quota
}
-
-start() {
- ebegin "Starting gssd"
- start-stop-daemon --start --exec /usr/sbin/rpc.gssd -- ${OPTS_RPC_GSSD}
- eend $?
-}
-
-stop() {
- ebegin "Stopping gssd"
- start-stop-daemon --stop --exec /usr/sbin/rpc.gssd
- eend $?
-}
diff --git a/main/nfs-utils/rpc.idmapd.initd b/main/nfs-utils/rpc.idmapd.initd
index 61cfd4de2e..9d53118022 100644
--- a/main/nfs-utils/rpc.idmapd.initd
+++ b/main/nfs-utils/rpc.idmapd.initd
@@ -1,25 +1,12 @@
#!/sbin/openrc-run
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
-rpc_bin=/usr/sbin/rpc.idmapd
+command="/usr/sbin/rpc.idmapd"
+command_args="$OPTS_RPC_IDMAPD"
depend() {
use ypbind net
need portmap rpc.pipefs
after quota
}
-
-start() {
- ebegin "Starting idmapd"
- ${rpc_bin} ${OPTS_RPC_IDMAPD}
- eend $? "make sure DNOTIFY support is enabled ..."
-}
-
-stop() {
- ebegin "Stopping idmapd"
- start-stop-daemon --stop --exec ${rpc_bin}
- eend $?
-}
diff --git a/main/nfs-utils/rpc.statd.initd b/main/nfs-utils/rpc.statd.initd
index ea78b9aef6..805d416f80 100644
--- a/main/nfs-utils/rpc.statd.initd
+++ b/main/nfs-utils/rpc.statd.initd
@@ -1,11 +1,12 @@
#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
-rpc_bin=/sbin/rpc.statd
-rpc_pid=/var/run/rpc.statd.pid
+name="NFS statd"
+
+command="/sbin/rpc.statd"
+command_args="$OPTS_RPC_STATD"
+pidfile="/run/rpc.statd.pid"
depend() {
use ypbind net
@@ -14,19 +15,8 @@ depend() {
}
start() {
- # Don't start rpc.statd if already started by someone else ...
- # Don't try and kill it if it's already dead ...
- if killall -q -0 ${rpc_bin} ; then
- return 0
- fi
-
- ebegin "Starting NFS statd"
- start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD}
- eend $?
-}
+ # Don't start rpc.statd if already started by someone else...
+ killall -q -0 "$command" && return 0
-stop() {
- ebegin "Stopping NFS statd"
- start-stop-daemon --stop --exec ${rpc_bin} --pidfile /var/run/rpc.statd.pid
- eend $?
+ default_start
}
diff --git a/main/nfs-utils/rpc.svcgssd.initd b/main/nfs-utils/rpc.svcgssd.initd
index c714e36076..d5ec93dc0d 100644
--- a/main/nfs-utils/rpc.svcgssd.initd
+++ b/main/nfs-utils/rpc.svcgssd.initd
@@ -1,23 +1,12 @@
#!/sbin/openrc-run
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+command="/usr/sbin/rpc.svcgssd"
+command_args="$OPTS_RPC_SVCGSSD"
+
depend() {
use ypbind net
need portmap rpc.pipefs
after quota
}
-
-start() {
- ebegin "Starting svcgssd"
- start-stop-daemon --start --exec /usr/sbin/rpc.svcgssd -- ${OPTS_RPC_SVCGSSD}
- eend $?
-}
-
-stop() {
- ebegin "Stopping svcgssd"
- start-stop-daemon --stop --exec /usr/sbin/rpc.svcgssd
- eend $?
-}