mirror of
https://github.com/ceph/ceph
synced 2025-02-17 16:07:37 +00:00
build/ops: rpm: rip out rcceph script
"rcceph" is a SysVinit-style command-line interface for stopping, starting, enabling, etc. all ceph-osd and ceph-mon systemd units on a machine, in one go. Since the same functionality is provided by ceph-{osd,mon}.target, the script is obsolete. It is also unmaintained. Judging from the absence of recent mentions of the script online, I guess it is no longer used. Leaving dead code in the tree can cause confusion, especially when the code is packaged and shipped to customers. Therefore I propose to rip it out. Signed-off-by: Nathan Cutler <ncutler@suse.com>
This commit is contained in:
parent
9a9a00cb3d
commit
a24afcdcd3
@ -896,7 +896,6 @@ install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
|
||||
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
||||
%endif
|
||||
install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
|
||||
install -m 0755 -D systemd/ceph %{buildroot}%{_sbindir}/rcceph
|
||||
install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
|
||||
@ -956,7 +955,6 @@ rm -rf %{buildroot}
|
||||
%{_libexecdir}/systemd/system-preset/50-ceph.preset
|
||||
%{_sbindir}/ceph-create-keys
|
||||
%{_sbindir}/ceph-disk
|
||||
%{_sbindir}/rcceph
|
||||
%dir %{_libexecdir}/ceph
|
||||
%{_libexecdir}/ceph/ceph_common.sh
|
||||
%dir %{_libdir}/rados-classes
|
||||
|
65
systemd/ceph
65
systemd/ceph
@ -1,65 +0,0 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ceph ceph-mon ceph-osd
|
||||
# Required-Start: $network $remote_fs
|
||||
# Required-Stop: $network $remote_fs
|
||||
# Should-Start: network-remotefs
|
||||
# Should-Stop: network-remotefs
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Ceph is a distributed object, and block, storage platform
|
||||
# Description: Ceph is a distributed object, block, and file storage platform
|
||||
### END INIT INFO
|
||||
|
||||
SYSTEMD_NO_WRAP=1 . /etc/rc.status
|
||||
rc_reset
|
||||
|
||||
action=$1 ; shift
|
||||
|
||||
# default cluster name to "ceph"
|
||||
cluster="ceph"
|
||||
|
||||
# Shared variables by many actions
|
||||
dir_mon="/var/lib/ceph/mon/"
|
||||
dir_osd="/var/lib/ceph/osd/"
|
||||
if test -d ${dir_mon} ; then
|
||||
lmon=`ls ${dir_mon} | grep ${cluster}`
|
||||
fi
|
||||
if test -d ${dir_osd} ; then
|
||||
losd=`ls ${dir_osd} | grep ${cluster}`
|
||||
fi
|
||||
prefix="${cluster}-"
|
||||
|
||||
case $action in start | stop | status | enable | disable | mask | unmask | restart | is-active | is-failed | show | kill | reset-failed )
|
||||
n=0
|
||||
if test -n "${lmon}" ; then
|
||||
for s in ${lmon#=${prefix}} ; do
|
||||
systemctl "${action}" ceph-mon@${s#$prefix}.service
|
||||
rc_check
|
||||
((++n))
|
||||
done
|
||||
fi
|
||||
if test -n "${losd}" ; then
|
||||
for s in ${losd#=${prefix}} ; do
|
||||
systemctl "${action}" ceph-osd@${s#$prefix}.service
|
||||
rc_check
|
||||
((++n))
|
||||
done
|
||||
fi
|
||||
if test $n -gt 0 ; then
|
||||
rc_status
|
||||
else
|
||||
rc_status -u
|
||||
fi
|
||||
systemctl "${action}" ceph.target
|
||||
rc_check
|
||||
;;
|
||||
*)
|
||||
echo "Invalid parameter : $action"
|
||||
echo "Valid parameters : start | stop | status | enable | disable | mask | unmask | restart | is-active | is-failed | show | kill | reset-failed"
|
||||
;;
|
||||
esac
|
||||
|
||||
rc_exit
|
||||
|
Loading…
Reference in New Issue
Block a user