#! /bin/sh
#
# evms          Enterprise Volume Management System
#
#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#		Modified for Debian GNU/Linux
#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#               Modified for evms package
#               by Matt Zimmerman <mdz@debian.org>
#

### BEGIN INIT INFO
# Provides:          evms
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Required-Start:    
# Required-Stop:     
# Short-Description: Activates EVMS volumes
# Description:       Activates any EVMS volumes that are left unactivated
#                    by the initramfs for some reason (or if the user does
#                    not use initramfs). This possibly includes setting up
#                    RAID, LVM, snapshots, BBR etc., but does not start a
#                    service.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=evms
DESC="Enterprise Volume Management System"

test -x /sbin/evms_activate || exit 0

. /lib/lsb/init-functions
. /etc/default/rcS

set -e

case "$1" in
  start|reload|restart|force-reload)
	log_begin_msg "Starting $DESC..."
	status=0
	if [ "$VERBOSE" != no ]; then
		evms_activate || status=$?
	else
		# Messages are still written to the log
		evms_activate >/dev/null 2>&1 || status=$?
	fi
	log_end_msg $status
	;;
  stop)
	;;
  status)
	echo "no daemons started by this script"
        log_end_msg 0
	;;
  *)
	N=/etc/init.d/$NAME
	log_success_msg "Usage: $N {start|stop|restart|reload|force-reload|status}"
	exit 1
	;;
esac

exit 0
