libvirt: update QCOW image detection
The script enforces the kind of file it will delete to prevent accidents. Update the detection of QCOW disk images for QCOW2. On an updated Ubuntu the file type is "QCOW2" instead of "QCOW". Change-Id: If6ab7113358f96749dadae53b52ae31e8f452777 Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
This commit is contained in:
parent
dcef4d4bf9
commit
8c64195f67
@ -68,7 +68,7 @@ delete_disk() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
file -b "$fpath" | grep -q "^QEMU QCOW Image (v3),"
|
||||
file -b "$fpath" | grep -q "^QEMU \(QCOW\|QCOW2\) Image (v3),"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "file to delete is not QEMU QCOW Image (v3): $fpath" >&2
|
||||
return 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user