[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]