use -e to test if volume exists
Because rootdir is a directory, not a file
This commit is contained in:
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.0
|
|||||||
|
|
||||||
VERSION=2.0
|
VERSION=2.0
|
||||||
PACKAGE=libpve-storage-perl
|
PACKAGE=libpve-storage-perl
|
||||||
PKGREL=8
|
PKGREL=9
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
|||||||
@ -1271,7 +1271,7 @@ sub vdisk_alloc {
|
|||||||
|
|
||||||
my $path = "$imagedir/$name";
|
my $path = "$imagedir/$name";
|
||||||
|
|
||||||
die "disk image '$path' already exists\n" if -f $path;
|
die "disk image '$path' already exists\n" if -e $path;
|
||||||
|
|
||||||
run_command("/usr/bin/qemu-img create -f $fmt '$path' ${size}K",
|
run_command("/usr/bin/qemu-img create -f $fmt '$path' ${size}K",
|
||||||
errmsg => "unable to create image");
|
errmsg => "unable to create image");
|
||||||
@ -1966,7 +1966,7 @@ sub activate_volumes {
|
|||||||
|
|
||||||
# check is volume exists
|
# check is volume exists
|
||||||
if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs') {
|
if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs') {
|
||||||
die "volume '$volid' does not exist\n" if ! -f $path;
|
die "volume '$volid' does not exist\n" if ! -e $path;
|
||||||
} else {
|
} else {
|
||||||
die "volume '$volid' does not exist\n" if ! -b $path;
|
die "volume '$volid' does not exist\n" if ! -b $path;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
libpve-storage-perl (2.0-9) unstable; urgency=low
|
||||||
|
|
||||||
|
* use -e (instead of -f) to test if volume exists
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Fri, 02 Dec 2011 10:31:01 +0100
|
||||||
|
|
||||||
libpve-storage-perl (2.0-8) unstable; urgency=low
|
libpve-storage-perl (2.0-8) unstable; urgency=low
|
||||||
|
|
||||||
* fix iscsi size bug
|
* fix iscsi size bug
|
||||||
|
|||||||
Reference in New Issue
Block a user