summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-blockdevices-filesystems.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-12-16 18:49:32 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-12-16 18:49:32 +0100
commit66b30435b8bcbdbcdc093556c4e1ef1c1e33fb00 (patch)
tree224bf0e4b58567ad87d1978728752dd74d6d5a0b /src/core/libs/lib-blockdevices-filesystems.sh
parent988c2e74ad5e2f169d26e02c961f97bbb8ac2381 (diff)
output cleanups
Diffstat (limited to 'src/core/libs/lib-blockdevices-filesystems.sh')
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index 6cb290c..53ad10d 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -510,13 +510,13 @@ rollback_filesystems ()
then
if [ -b $real_part ] && cryptsetup status $real_part &>/dev/null # don't use 'isLuks' it only works for the "underlying" device (eg in /dev/sda1 -> luksOpen -> /dev/mapper/foo, isLuks works only on the former. status works on the latter too)
then
- if pvdisplay $real_part >/dev/null
+ if pvdisplay $real_part &>/dev/null
then
debug "$part ->Cannot do right now..."
open_items=1
else
infofy "Attempting destruction of device $part (type $part_type)" disks
- if ! cryptsetup luksClose $real_part >$LOG
+ if ! cryptsetup luksClose $real_part &>$LOG
then
warnings="$warnings\nCould not cryptsetup luksClose $real_part"
show_warning "process_filesystems blockdevice destruction" "Could not cryptsetup luksClose $real_part"
@@ -535,7 +535,7 @@ rollback_filesystems ()
open_items=1
else
infofy "Attempting destruction of device $part (type $part_type)" disks
- if ! pvremove $real_part >$LOG
+ if ! pvremove $real_part &>$LOG
then
warnings="$warnings\nCould not pvremove $part"
show_warning "process_filesystems blockdevice destruction" "Could not pvremove $part"
@@ -548,14 +548,14 @@ rollback_filesystems ()
then
if vgdisplay $part | grep -q 'VG Name' # workaround for non-existing lvm VG device files
then
- open_lv=`vgdisplay -c $part | cut -d ':' -f6`
+ open_lv=`vgdisplay -c $part 2>/dev/null | cut -d ':' -f6`
if [ $open_lv -gt 0 ]
then
debug "$part ->Cannot do right now..."
open_items=1
else
infofy "Attempting destruction of device $part (type $part_type)" disks
- if ! vgremove $part >$LOG # we shouldn't need -f because we clean up the lv's first.
+ if ! vgremove $part &>$LOG # we shouldn't need -f because we clean up the lv's first.
then
warnings="$warnings\nCould not vgremove $part"
show_warning "process_filesystems blockdevice destruction" "Could not vgremove $part"
@@ -566,7 +566,7 @@ rollback_filesystems ()
fi
elif [ "$part_type" = lvm-lv ] #Can be in use for: dm_crypt or raw. we don't need to care about raw (it will be unmounted so it can be destroyed)
then
- if lvdisplay $part >/dev/null && ! vgdisplay $part 2>/dev/null | grep -q 'VG Name' # it exists: lvdisplay works, and it's not a volume group (you can do lvdisplay $volumegroup)
+ if lvdisplay $part &>/dev/null && ! vgdisplay $part 2>/dev/null | grep -q 'VG Name' # it exists: lvdisplay works, and it's not a volume group (you can do lvdisplay $volumegroup)
then
if cryptsetup isLuks $part &>/dev/null
then
@@ -574,7 +574,7 @@ rollback_filesystems ()
open_items=1
else
infofy "Attempting destruction of device $part (type $part_type)" disks
- if ! lvremove -f $part >$LOG
+ if ! lvremove -f $part &>$LOG
then
warnings="$warnings\nCould not lvremove -f $part"
show_warning "process_filesystems blockdevice destruction" "Could not lvremove -f $part"