From owner-svn-src-stable-10@freebsd.org Mon Mar 28 09:36:53 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44118ADFCDB; Mon, 28 Mar 2016 09:36:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 162411D37; Mon, 28 Mar 2016 09:36:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9aqVG005505; Mon, 28 Mar 2016 09:36:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9aqXU005504; Mon, 28 Mar 2016 09:36:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280936.u2S9aqXU005504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r297346 - stable/10/usr.sbin/pc-sysinstall/backend X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:36:53 -0000 Author: mav Date: Mon Mar 28 09:36:52 2016 New Revision: 297346 URL: https://svnweb.freebsd.org/changeset/base/297346 Log: MFC r296656: Don't bother to invoke gmirror or zpool if the module is not loaded. Modified: stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 28 09:35:29 2016 (r297345) +++ stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 28 09:36:52 2016 (r297346) @@ -263,6 +263,9 @@ delete_all_gpart() # Function to export all zpools before starting an install stop_all_zfs() { + if [ ! -c /dev/zfs ]; then + return; + fi local DISK="`echo ${1} | sed 's|/dev/||g'`" # Export any zpools using this device so we can overwrite @@ -278,6 +281,9 @@ stop_all_zfs() # Function which stops all gmirrors before doing any disk manipulation stop_all_gmirror() { + if [ ! -d /dev/mirror ]; then + return; + fi local DISK="`echo ${1} | sed 's|/dev/||g'`" GPROV="`gmirror list | grep ". Name: mirror/" | cut -d '/' -f 2`" for gprov in $GPROV