summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2016-03-28 09:36:52 +0000
committermav <mav@FreeBSD.org>2016-03-28 09:36:52 +0000
commiteccbb81df1af9e821df14be236ec9c5ce33eb43d (patch)
tree62a4735bedf45074ff7236fbe1611ead62acef02
parentb7a195148769a9863d98d3fdb59eb928b5dddb62 (diff)
downloadFreeBSD-src-eccbb81df1af9e821df14be236ec9c5ce33eb43d.zip
FreeBSD-src-eccbb81df1af9e821df14be236ec9c5ce33eb43d.tar.gz
MFC r296656:
Don't bother to invoke gmirror or zpool if the module is not loaded.
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-disk.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-disk.sh b/usr.sbin/pc-sysinstall/backend/functions-disk.sh
index ba2d260..03b6cde 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-disk.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-disk.sh
@@ -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
OpenPOWER on IntegriCloud