Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2016 09:36:52 +0000 (UTC)
From:      Alexander Motin <mav@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: r297346 - stable/10/usr.sbin/pc-sysinstall/backend
Message-ID:  <201603280936.u2S9aqXU005504@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 



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