summaryrefslogtreecommitdiff
blob: 03a25d991d96b580af082354b5478b3256db7d2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# /lib/rcscripts/addons/lvm-stop.sh
# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/files/multipath-stop.sh,v 1.1 2008/06/20 23:57:19 robbat2 Exp $

dm_in_proc() {
	local retval=0
	for x in devices misc ; do
		grep -qs 'device-mapper' /proc/${x}
		retval=$((${retval} + $?))
	done
	return ${retval}
}

# Stop LVM2
if [ -x /sbin/multipath -a dm_in_proc ]; then
	ebegin "Shutting down Multipath devices"
	/sbin/multipath -v0 -F >/dev/null
	retval=$?
	eend $retval "Failed to shut down Multipath devices"
fi

# vim:ts=4