[sys-cluster/glusterfs] try py3k13
This commit is contained in:
32
sys-cluster/glusterfs/files/glusterd-10.2-r2.initd
Normal file
32
sys-cluster/glusterfs/files/glusterd-10.2-r2.initd
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# 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 2>&1 && [ "${c}" -lt "${glusterd_max_wait_start-60}" ]; do
|
||||
c=$(( c+1 ))
|
||||
done
|
||||
[ "${c}" -lt "${glusterd_max_wait_start-60}" ]
|
||||
eend $?
|
||||
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user