Author: mav Date: Fri Mar 11 14:24:32 2016 New Revision: 296656 URL: https://svnweb.freebsd.org/changeset/base/296656
Log: Don't bother to invoke gmirror or zpool if the module is not loaded. Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Fri Mar 11 14:14:15 2016 (r296655) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Fri Mar 11 14:24:32 2016 (r296656) @@ -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 _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"