summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaco Kroon <jaco@uls.co.za>2021-05-14 17:34:50 +0200
committerJoonas Niilola <juippis@gentoo.org>2021-05-19 13:06:44 +0300
commit9e597c877e100dff6e1dae28eb0fdb5884b43610 (patch)
treea82976d0becb911f132e03b3ca394bc45e851a4a /sys-cluster/glusterfs/files
parentwww-apps/piwigo: 11.5.0 version bump (diff)
downloadgentoo-9e597c877e100dff6e1dae28eb0fdb5884b43610.tar.gz
gentoo-9e597c877e100dff6e1dae28eb0fdb5884b43610.tar.bz2
gentoo-9e597c877e100dff6e1dae28eb0fdb5884b43610.zip
sys-cluster/glusterfs: version 8.5
Suggestions from ionen: * Re-ordered pre-amble. * Drop systemd inherit. * Re-order phase funcs (src_test before src_install). Spotted whilst making above changes: tmpfiles.d files installed into /etc/tmpfiles.d instead of /usr/lib/tmpfiles.d (as per systemd hard-coded path). Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'sys-cluster/glusterfs/files')
-rw-r--r--sys-cluster/glusterfs/files/glusterd-r4.initd32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-cluster/glusterfs/files/glusterd-r4.initd b/sys-cluster/glusterfs/files/glusterd-r4.initd
new file mode 100644
index 000000000000..ba4749aef072
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterd-r4.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Gluster elastic volume management daemon"
+command="/usr/sbin/glusterd"
+pidfile="/run/${SVCNAME}.pid"
+command_args="-N"
+
+command_background="yes"
+
+depend() {
+ need net
+ before netmount
+}
+
+start_pre() {
+ # Ensure that the GlusterFS auxiliary mount parent directory exists
+ checkpath --directory --owner gluster:gluster --mode 0775 /run/gluster
+}
+
+start_post() {
+ local c=0
+ ebegin "Waiting for glusterd to start up"
+ while ! /usr/sbin/gluster volume list &>/dev/null && [ "${c}" -lt "${glusterd_max_wait_start-60}" ]; do
+ (( ++c ))
+ done
+ [ "${c}" -lt "${glusterd_max_wait_start-60}" ]
+ eend $?
+
+ return 0
+}