diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2016-05-12 14:04:08 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2016-05-12 14:04:08 -0700 |
commit | cdc8feb0f3590c62ac103efdb3f5ba903df8dc52 (patch) | |
tree | 8360e2ad28afa4069f47778160f425300cde2352 /sys-cluster/ceph/files | |
parent | profiles: package.use.mask sys-cluster/ceph[test] on arm since dev-python/tox... (diff) | |
download | gentoo-cdc8feb0f3590c62ac103efdb3f5ba903df8dc52.tar.gz gentoo-cdc8feb0f3590c62ac103efdb3f5ba903df8dc52.tar.bz2 gentoo-cdc8feb0f3590c62ac103efdb3f5ba903df8dc52.zip |
sys-cluster/ceph: Revision bump to 0.94.6-r1, don't try to run as "ceph" user
Gentoo-Bug: 577570
Package-Manager: portage-2.2.28
Diffstat (limited to 'sys-cluster/ceph/files')
-rw-r--r-- | sys-cluster/ceph/files/ceph.initd-r1.1 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph.initd-r1.1 b/sys-cluster/ceph/files/ceph.initd-r1.1 new file mode 100644 index 000000000000..bb603259715d --- /dev/null +++ b/sys-cluster/ceph/files/ceph.initd-r1.1 @@ -0,0 +1,39 @@ +#!/sbin/openrc-run + +ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}" +extra_commands="reload" +daemon_type="${RC_SVCNAME#ceph-}" +daemon_type="${daemon_type%.*}" +daemon_id="${RC_SVCNAME#ceph-*.}" +daemon_id="${daemon_id:-0}" +command="/usr/bin/ceph-${daemon_type}" +pidfile="/run/ceph/${daemon_type}.${daemon_id}.pid" +command_args="-i ${daemon_id} --pid-file ${pidfile} -c ${ceph_conf}" + +depend() { + after net ntpd ntp-client chronyd + before netmount +} + +is_type_valid() { + case ${daemon_type} in + mon|mds|osd) return 0;; + *) return 1;; + esac +} + +start_pre() { + checkpath -d -q -o ceph "$(dirname "${pidfile}")" + if ! is_type_valid ;then + eerror "Please give valid Ceph Server Type: mds, mon, osd" + return 1 + fi +} + +reload() { + ebegin "Reloading Ceph ${daemon_type}.${daemon_id}" + start-stop-daemon --signal 1 ${start_stop_daemon_args} --pidfile "${pidfile}" + eend $? +} + +# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: |