diff options
author | Eric Edgar <rocket@gentoo.org> | 2005-06-18 07:11:05 +0000 |
---|---|---|
committer | Eric Edgar <rocket@gentoo.org> | 2005-06-18 07:11:05 +0000 |
commit | 733983eec83b084cd7d71211affa45937c63b669 (patch) | |
tree | e97a4cf17279caf70753c3340290787cff5982fe /sys-fs/lvm2 | |
parent | Manual Manifest commit. (diff) | |
download | gentoo-2-733983eec83b084cd7d71211affa45937c63b669.tar.gz gentoo-2-733983eec83b084cd7d71211affa45937c63b669.tar.bz2 gentoo-2-733983eec83b084cd7d71211affa45937c63b669.zip |
Fix bug 95591. More flexible command output parsing to handle changes in lvm.conf
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-fs/lvm2')
-rwxr-xr-x | sys-fs/lvm2/files/lvm2-stop.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys-fs/lvm2/files/lvm2-stop.sh b/sys-fs/lvm2/files/lvm2-stop.sh index 1ecdbafcd4a8..0fac0a61b514 100755 --- a/sys-fs/lvm2/files/lvm2-stop.sh +++ b/sys-fs/lvm2/files/lvm2-stop.sh @@ -1,8 +1,7 @@ # /lib/rcscripts/addons/lvm2-stop.sh -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-stop.sh,v 1.3 2005/05/20 04:30:02 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-stop.sh,v 1.4 2005/06/18 07:11:05 rocket Exp $ # Stop LVM2 - if [ -x /sbin/vgchange ] && \ [ -x /sbin/lvdisplay ] && \ [ -x /sbin/vgdisplay ] && \ @@ -16,8 +15,8 @@ then # functionality as described in this forum thread #https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html - LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|awk '{print $3}'|sort` - VOLUME_GROUPS=`vgdisplay |grep "VG Name"|awk '{print $3}'|sort` + LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|sed -e 's/.*LV Name\s*\(.*\)/\1/'|sort` + VOLUME_GROUPS=`vgdisplay |grep "VG Name"|sed -e 's/.*VG Name\s*\(.*\)/\1/'|sort` for x in ${LOGICAL_VOLUMES} do LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|awk '{print $3}'` @@ -31,7 +30,7 @@ then for x in ${VOLUME_GROUPS} do - VG_HAS_ACTIVE_LV=`vgdisplay ${x}|grep "Open LV"|awk '{print $3}'` + VG_HAS_ACTIVE_LV=`vgdisplay ${x}|grep "Open LV"|sed -e 's/.*Open LV\s*\(.*\)/\1/'` if [ "${VG_HAS_ACTIVE_LV}" = 0 ] then ebegin " Shutting Down volume group: ${x} " @@ -42,7 +41,7 @@ then for x in ${LOGICAL_VOLUMES} do - LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|awk '{print $3}'` + LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|sed -e 's/.*# open\s*\(.*\)/\1/'` if [ "${LV_IS_ACTIVE}" = 1 ] then |