be smarter about mounting qcow images
some images have partition tables, some don't
This commit is contained in:
parent
90f0077cba
commit
d935fc0e07
1 changed files with 5 additions and 1 deletions
|
@ -105,5 +105,9 @@ function mount_qcow_image() {
|
||||||
|
|
||||||
WORK_DIR=$(mktemp -d)
|
WORK_DIR=$(mktemp -d)
|
||||||
map_nbd $1
|
map_nbd $1
|
||||||
sudo mount ${NBD_DEV}p1 $WORK_DIR
|
if [ -e "${NBD_DEV}p1" ]; then
|
||||||
|
sudo mount ${NBD_DEV}p1 $WORK_DIR
|
||||||
|
else
|
||||||
|
sudo mount ${NBD_DEV} $WORK_DIR
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue