diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-13 12:39:40 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-13 12:39:40 +0100 |
commit | 0c32d5e0095b0f8944ef907458de332ecf38cc4c (patch) | |
tree | 8486e9cd2b9c39ceeeca4678a9912b30ae8667a4 /src/core | |
parent | e6bd4c0a9391e1d473e0766a7401556ba2526b26 (diff) |
workaround missing VG device files
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 841a694..357f266 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -445,6 +445,10 @@ process_filesystems () [ "$part_type" = lvm-vg ] && ( vgremove -f $part || show_warning "process_filesystems blockdevice destruction" "Could not vgremove -f $part") [ "$part_type" = lvm-lv ] && ( lvremove -f $part || show_warning "process_filesystems blockdevice destruction" "Could not lvremove -f $part") [ "$part_type" = dm_crypt ] && ( cryptsetup luksClose $part || show_warning "process_filesystems blockdevice destruction" "Could not cryptsetup luksClose $part") + elif [ "$part_type" = lvm-vg ] && vgdisplay $part | grep -q 'VG Name' # workaround for non-existing lvm VG device files + then + infofy "Attempting destruction of device $part (type $part_type)" disks + [ "$part_type" = lvm-vg ] && ( vgremove -f $part || show_warning "process_filesystems blockdevice destruction" "Could not vgremove -f $part") else debug "Skipping destruction of device $part (type $part_type) because it doesn't exist" fi |