[linux-lvm] '/etc/init.d/lvm' script in debian package

Russell Coker russell at coker.com.au
Fri Dec 22 18:23:22 UTC 2000


Here's my current effort:

#!/bin/sh
#
# lvm		This script handles the LVM startup/shutdown
#		so that LVMs are properly configured and available.
#

if [ "0" = `grep -c lvm /proc/devices` ]; then
  exit 0
fi
[ -f /etc/lvmtab ] || exit 0
[ -x /sbin/vgscan ] || exit 0

case "$1" in
	start)
		echo "Setting up LVM Volume Groups..."
		#/sbin/vgscan
		/sbin/vgchange -a y
		;;
	
	stop)
		echo "Shutting down LVM Volume Groups... "
		/sbin/vgchange -a n
		;;

	restart|force-reload)
		echo "Does not make sense to restart."
		exit 1
		;;
	*)
		echo "Usage: lvm {start|stop}" >&2
		exit 1
		;;
esac


-- 
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page



More information about the linux-lvm mailing list