#!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: $ depend() { need modules checkfs } checkconfig() { if [ ! -x /sbin/vgchange ] then eerror "Could not locate LVM2 userspace utilities." return 1 fi } start() { checkconfig || return 1 modprobe dm-mod &>/dev/null if [ ! -f /dev/.devfsd ] then major=$(grep "[0-9] misc$" /proc/devices | sed 's/[ ]\+misc//') minor=$(grep "[0-9] device-mapper$" /proc/misc | sed 's/[ ]\+device-mapper//') if [ ! -d /dev/mapper ] then mkdir -p /dev/mapper &> /dev/null fi if [ ! -c /dev/mapper/control ] then mknod -m 600 /dev/mapper/control $major $minor >&/dev/null fi fi ebegin "Starting the Logical Volume Manager (LVM2)" vgchange -a y eend $? } stop() { ebegin "Stopping the Logical Volume Manager (LVM2)" vgchange -a n eend $? }