diff options
author | jhb <jhb@FreeBSD.org> | 2016-08-10 16:31:15 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-08-10 16:31:15 +0000 |
commit | 98c45f70e622fc63ef03c36a9a577d6816c6c396 (patch) | |
tree | 4417a33a592cbea70eb35a36e2b7d2ad7412df6a /share | |
parent | 7d5f37a1c6dc075a321bb32445b70f87f39a768c (diff) | |
download | FreeBSD-src-98c45f70e622fc63ef03c36a9a577d6816c6c396.zip FreeBSD-src-98c45f70e622fc63ef03c36a9a577d6816c6c396.tar.gz |
MFC 273102:
Use '-e' to check if the virtio backing file has already been created.
The '-f' check works fine on a regular file but not if the backing file is
a device (e.g., /dev/md0). In this case it would print a misleading but
otherwise benign message about the backing file not being present.
PR: 210410
Diffstat (limited to 'share')
-rwxr-xr-x | share/examples/bhyve/vmrun.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index 72193de..b2f2195 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -177,7 +177,7 @@ make_and_check_diskdev() { local virtio_diskdev="$1" # Create the virtio diskdev file if needed - if [ ! -f ${virtio_diskdev} ]; then + if [ ! -e ${virtio_diskdev} ]; then echo "virtio disk device file \"${virtio_diskdev}\" does not exist." echo "Creating it ..." truncate -s 8G ${virtio_diskdev} > /dev/null |