mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
c0980af3c7
This patch creates rbdmap shell script that is called from init-rbdmap init script. The patch also renames src/rbdmap configuration file to src/etc-rbdmap so that rbdmap shell script can be installed via build system directly. Finally, the patch accomodates these changes in spec file and build system. Fixes: #13374 Signed-off-by: Boris Ranto <branto@redhat.com>
57 lines
844 B
Bash
Executable File
57 lines
844 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# rbdmap Ceph RBD Mapping
|
|
#
|
|
# chkconfig: 2345 20 80
|
|
# description: Ceph RBD Mapping
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: rbdmap
|
|
# Required-Start: $network $remote_fs
|
|
# Required-Stop: $network $remote_fs
|
|
# Should-Start: ceph
|
|
# Should-Stop: ceph
|
|
# X-Start-Before: $x-display-manager
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: Ceph RBD Mapping
|
|
# Description: Ceph RBD Mapping
|
|
### END INIT INFO
|
|
|
|
RBDMAPFILE="/etc/ceph/rbdmap"
|
|
|
|
if [ -e /lib/lsb/init-functions ]; then
|
|
. /lib/lsb/init-functions
|
|
fi
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
|
start)
|
|
rbdmap map
|
|
;;
|
|
|
|
stop)
|
|
rbdmap unmap
|
|
;;
|
|
|
|
restart|force-reload)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
|
|
reload)
|
|
rbdmap map
|
|
;;
|
|
|
|
status)
|
|
rbd showmapped
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: rbdmap {start|stop|restart|force-reload|reload|status}"
|
|
exit 1
|
|
;;
|
|
esac
|