From owner-svn-src-all@FreeBSD.ORG Tue Oct 14 18:34:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 440018D3; Tue, 14 Oct 2014 18:34:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCE531A; Tue, 14 Oct 2014 18:34:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EIYGCs086841; Tue, 14 Oct 2014 18:34:16 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EIYGwQ086840; Tue, 14 Oct 2014 18:34:16 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201410141834.s9EIYGwQ086840@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 14 Oct 2014 18:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273102 - head/share/examples/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 18:34:16 -0000 Author: neel Date: Tue Oct 14 18:34:15 2014 New Revision: 273102 URL: https://svnweb.freebsd.org/changeset/base/273102 Log: 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. Submitted by: Marcus Reid (marcus@blazingdot.com) Discussed with: grehan Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Tue Oct 14 17:13:47 2014 (r273101) +++ head/share/examples/bhyve/vmrun.sh Tue Oct 14 18:34:15 2014 (r273102) @@ -152,7 +152,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