diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2007-05-21 14:09:47 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2007-05-21 14:09:47 +0000 |
commit | ec11bb08748cedfebe2231968ac1324bbd8fdffd (patch) | |
tree | d39b1983730c38619c1ad4b27eccb0133fb64244 /sys-fs | |
parent | de-bash-ification by Uberlord (diff) | |
download | gentoo-2-ec11bb08748cedfebe2231968ac1324bbd8fdffd.tar.gz gentoo-2-ec11bb08748cedfebe2231968ac1324bbd8fdffd.tar.bz2 gentoo-2-ec11bb08748cedfebe2231968ac1324bbd8fdffd.zip |
de-bash-ification by Uberlord
(Portage version: 2.1.2.7)
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/lvm2/ChangeLog | 5 | ||||
-rwxr-xr-x | sys-fs/lvm2/files/lvm2-start.sh | 27 |
2 files changed, 21 insertions, 11 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog index bc23d4feb4b9..7a158cf7bfcc 100644 --- a/sys-fs/lvm2/ChangeLog +++ b/sys-fs/lvm2/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-fs/lvm2 # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.100 2007/05/16 04:43:54 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.101 2007/05/21 14:09:47 cardoe Exp $ + + 21 May 2007; Doug Goldstein <cardoe@gentoo.org> files/lvm2-start.sh: + de-bash-ification by Uberlord 16 May 2007; Jeroen Roovers <jer@gentoo.org> lvm2-2.02.10.ebuild: Stable for HPPA (bug #158794). diff --git a/sys-fs/lvm2/files/lvm2-start.sh b/sys-fs/lvm2/files/lvm2-start.sh index f3f0cca03a14..7fb6c9aa9af7 100755 --- a/sys-fs/lvm2/files/lvm2-start.sh +++ b/sys-fs/lvm2/files/lvm2-start.sh @@ -1,25 +1,32 @@ # /lib/rcscripts/addons/lvm2-start.sh -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh,v 1.4 2005/06/18 06:42:42 rocket Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh,v 1.5 2007/05/21 14:09:47 cardoe Exp $ + +dm_in_proc() { + local retval=0 + for x in devices misc ; do + grep -qs 'device-mapper' /proc/${x} + retval=$((${retval} + $?)) + done + return ${retval} +} # LVM support for /usr, /home, /opt .... # This should be done *before* checking local # volumes, or they never get checked. - + # NOTE: Add needed modules for LVM or RAID, etc # to /etc/modules.autoload if needed -if [[ -z ${CDBOOT} ]] && [[ -x /sbin/vgscan ]] ; then - if [[ -e /proc/modules ]] && \ - ! grep -qs 'device-mapper' /proc/{devices,misc} - then - modprobe dm-mod &>/dev/null +if [ -z "${CDBOOT}" -a -x /sbin/vgscan ] ; then + if [ -e /proc/modules ] && ! dm_in_proc ; then + modprobe dm-mod 2>/dev/null fi - if [[ -d /proc/lvm ]] || grep -qs 'device-mapper' /proc/{devices,misc} ; then + if [ -d /proc/lvm ] || dm_in_proc ; then ebegin "Setting up the Logical Volume Manager" #still echo stderr for debugging /sbin/vgscan --mknodes --ignorelockingfailure >/dev/null - if [[ $? == 0 ]] && [[ -x /sbin/vgchange ]] && \ - [[ -f /etc/lvmtab || -d /etc/lvm ]] + if [ $? = 0 -a -x /sbin/vgchange ] && \ + [ -f /etc/lvmtab -o -d /etc/lvm ] then /sbin/vgchange --ignorelockingfailure -a y >/dev/null fi |