Bug#336258: Add init script for clvmd

Zach Lowry zach at zachlowry.net
Fri Oct 28 23:49:44 UTC 2005


Package: clvm
Version: 2.01.04-5
Severity: wishlist
Tags: patch

I have taken the liberty of writing a simple init script for clvm to be incorporated. 

#! /bin/sh
#
# clvmd		initscript for clvmd
#
# Author:	Zach Lowry <zacxh at zachlowry.net>.
#
# Version:	1
#

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="clvmd"
NAME=clvmd
DAEMON=/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

d_start() {
	start-stop-daemon --start --quiet --pidfile $PIDFILE \
		--exec $DAEMON
}

d_stop() {
	start-stop-daemon --stop --quiet --pidfile $PIDFILE \
		--name $NAME
}

d_reload() {
	start-stop-daemon --stop --quiet --pidfile $PIDFILE \
		--name $NAME --signal 1
}

case "$1" in
  start)
	echo -n "Starting $DESC: $NAME"
	d_start
	echo "."
	;;
  stop)
	echo -n "Stopping $DESC: $NAME"
	d_stop
	echo "."
	;;
  restart|force-reload)
	echo -n "Restarting $DESC: $NAME"
	d_stop
	sleep 1
	d_start
	echo "."
	;;
  *)
	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.12-1-686-smp-gcc3.3
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages clvm depends on:
ii  libc6                  2.3.2.ds1-22      GNU C Library: Shared libraries an
ii  libdevmapper1.01       2:1.01.00-4       The Linux Kernel Device Mapper use
ii  libdlm0                0.trunk20050206-2 Distributed lock manager - library
ii  lvm2                   2.01.04-5         The Linux Logical Volume Manager

-- no debconf information




More information about the pkg-lvm-maintainers mailing list