ALT Linux repos
S: | 2.03.22-alt1 |
5.0: | 2.02.39-alt1 |
4.1: | 2.02.31-alt1 |
4.0: | 2.02.28-alt1.M40.1 |
3.0: | 2.01.09-alt2 |
+backports: | 2.02.01-alt0.M30.1 |
Group :: System/Base
RPM: lvm2
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
#!/bin/bash
#
# This file is part of LVM2.
# It is required for the proper handling of failures of LVM2 mirror
# devices that were created using the -m option of lvcreate.
#
#
# chkconfig: 12345 25 75
# description: Controls availability of block devices
#
### BEGIN INIT INFO
# Provides: blk-availability
# Required-Start:
# Required-Stop:
# Default-Start: 1 2 3 4 5
# Default-Stop: 0 6
# Short-Description: Availability of block devices
### END INIT INFO
WITHOUT_RC_COMPAT=1
. /etc/init.d/functions
OPTIONS="-u -l wholevg"
LOCKFILE="/var/lock/subsys/blk-availability"
RETVAL=0
start()
{
touch $LOCKFILE
RETVAL=$?
return $RETVAL
}
stop()
{
action "Stopping block device availability:" blkdeactivate $OPTIONS
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
RETVAL=$?
[ $RETVAL = 0 ] && rm -f $LOCKFILE
;;
restart|reload)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart|condreload)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac
exit $RETVAL