75 lines
1.6 KiB
Plaintext
75 lines
1.6 KiB
Plaintext
|
#! /bin/sh
|
||
|
#
|
||
|
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
|
||
|
#
|
||
|
# /etc/init.d/boot.lvm
|
||
|
#
|
||
|
### BEGIN INIT INFO
|
||
|
# Provides: boot.lvm
|
||
|
# Required-Start: boot.device-mapper boot.udev boot.rootfsck
|
||
|
# X-UnitedLinux-Should-Start: boot.multipath boot.md boot.scsidev
|
||
|
# Required-Stop:
|
||
|
# Default-Start: B
|
||
|
# Default-Stop:
|
||
|
# Description: start logical volumes
|
||
|
### END INIT INFO
|
||
|
|
||
|
. /etc/rc.status
|
||
|
. /etc/sysconfig/lvm
|
||
|
|
||
|
# udev interaction
|
||
|
if [ -x /sbin/udevsettle ] ; then
|
||
|
[ -z "$LVM_DEVICE_TIMEOUT" ] && LVM_DEVICE_TIMEOUT=60
|
||
|
else
|
||
|
LVM_DEVICE_TIMEOUT=0
|
||
|
fi
|
||
|
|
||
|
rc_reset
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
#
|
||
|
# Find and activate volume groups (HM 1/1/1999)
|
||
|
#
|
||
|
if test -d /etc/lvm -a -x /sbin/vgscan -a -x /sbin/vgchange ; then
|
||
|
# Waiting for udev to settle
|
||
|
if [ "$LVM_DEVICE_TIMEOUT" -gt 0 ] ; then
|
||
|
echo "Waiting for udev to settle..."
|
||
|
/sbin/udevsettle --timeout=$LVM_DEVICE_TIMEOUT
|
||
|
fi
|
||
|
echo "Scanning for LVM volume groups..."
|
||
|
/sbin/vgscan --mknodes
|
||
|
echo "Activating LVM volume groups..."
|
||
|
/sbin/vgchange -a y $LVM_VGS_ACTIVATED_ON_BOOT
|
||
|
|
||
|
# currently unavailable with lvm2
|
||
|
#if test -s /etc/pvpath.cfg -a -x /sbin/pvpathrestore; then
|
||
|
# /sbin/pvpathrestore
|
||
|
#fi
|
||
|
rc_status -v -r
|
||
|
fi
|
||
|
;;
|
||
|
stop)
|
||
|
if test -d /etc/lvmtab.d -a -x /sbin/vgchange ; then
|
||
|
/sbin/vgchange -a n
|
||
|
|
||
|
# currently unavailable with lvm2
|
||
|
#if test -s /etc/pvpath.cfg -a -x /sbin/pvpathsave; then
|
||
|
# /sbin/pvpathsave
|
||
|
#fi
|
||
|
|
||
|
fi
|
||
|
rc_status -v
|
||
|
;;
|
||
|
status)
|
||
|
rc_failed 4
|
||
|
rc_status -v
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {start|stop|status}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
rc_exit
|