diff options
author | mav <mav@FreeBSD.org> | 2016-03-11 14:24:32 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-11 14:24:32 +0000 |
commit | b01d3ee35102a84fc26294b6ce195a43f216c098 (patch) | |
tree | 8b3817fee7b2bbac6586cd27b3c24ac339bee8cc /usr.sbin | |
parent | c2ff09f6f1cd53d3e6daf040bf6b5106db804a50 (diff) | |
download | FreeBSD-src-b01d3ee35102a84fc26294b6ce195a43f216c098.zip FreeBSD-src-b01d3ee35102a84fc26294b6ce195a43f216c098.tar.gz |
Don't bother to invoke gmirror or zpool if the module is not loaded.
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend/functions-disk.sh | 6 |
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 e40bc81..014ae25 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 |