cookbook-openstack-block-st.../templates/default/cinder-group-active.erb

38 lines
611 B
Plaintext

#!/bin/sh
#
# cinder volume group active script
#
# only support start action
# chkconfig: - 98 02
#
### BEGIN INIT INFO
# Required-Start: $remote_fs $network $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: cinder volume group active script
### END INIT INFO
. /etc/rc.d/init.d/functions
start()
{
echo -n "Activing cinder volume group ..."
vgcreate cinder-volumes $(losetup --show -f <%= @volume_file %>)
success
echo
}
RETVAL=0
case "$1" in
start)
start
;;
*)
echo "Usage: $0 {start}"
RETVAL=1
esac
exit $RETVAL