Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37826540
en ru br
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 02 99
# description: Starts and stops LVM metadata daemon
# processname: lvmetad
# pidfile: /var/run/lvmetad.pi
#
### BEGIN INIT INFO
# Provides: lvm2-lvmetad
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 1 2 3 4 5
# Default-Stop: 0 6
# Short-Description: A daemon that maintains LVM metadata state for improved
# performance by avoiding further scans while running
# subsequent LVM commands or while using lvm2app library.
### END INIT INFO

WITHOUT_RC_COMPAT=1

. /etc/init.d/functions

DAEMON=lvmetad

LOCKFILE="/var/lock/subsys/$DAEMON"
PIDFILE="/var/run/lvmetad.pid"
RETVAL=0

start()
{
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root $DAEMON
RETVAL=$?
return $RETVAL
}


stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root $DAEMON
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart|condreload)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root $DAEMON
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin