Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2016 16:31:15 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r303925 - stable/10/share/examples/bhyve
Message-ID:  <201608101631.u7AGVF4j038500@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Aug 10 16:31:15 2016
New Revision: 303925
URL: https://svnweb.freebsd.org/changeset/base/303925

Log:
  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

Modified:
  stable/10/share/examples/bhyve/vmrun.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/examples/bhyve/vmrun.sh
==============================================================================
--- stable/10/share/examples/bhyve/vmrun.sh	Wed Aug 10 16:12:31 2016	(r303924)
+++ stable/10/share/examples/bhyve/vmrun.sh	Wed Aug 10 16:31:15 2016	(r303925)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608101631.u7AGVF4j038500>