From nobody@FreeBSD.org  Thu Aug 12 22:28:46 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5C0A11065679
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 22:28:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 4B5B88FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 22:28:46 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o7CMSjJi002151
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 22:28:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o7CMSjex002150;
	Thu, 12 Aug 2010 22:28:45 GMT
	(envelope-from nobody)
Message-Id: <201008122228.o7CMSjex002150@www.freebsd.org>
Date: Thu, 12 Aug 2010 22:28:45 GMT
From: John Hixson <john@ixsystems.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pc-sysinstall patch for zpool vdevs
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         149599
>Category:       bin
>Synopsis:       [patch] pc-sysinstall patch for zpool vdevs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 12 22:30:01 UTC 2010
>Closed-Date:    Thu Aug 19 00:06:19 MDT 2010
>Last-Modified:  Thu Aug 19 06:10:06 UTC 2010
>Originator:     John Hixson
>Release:        9.0-CURRENT
>Organization:
iXsystems
>Environment:
FreeBSD thinkbsd 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Tue Jul 13 09:31:39 PDT 2010     john@thinkbsd:/usr/src/sys/amd64/compile/THINKBSD  amd64

>Description:
Simple patch to add support zpool virtual devices that are not currently supported.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN usr.sbin/pc-sysinstall.orig/backend/functions-bsdlabel.sh usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
--- usr.sbin/pc-sysinstall.orig/backend/functions-bsdlabel.sh	2010-06-27 09:46:11.000000000 -0700
+++ usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh	2010-08-12 15:24:12.000000000 -0700
@@ -58,20 +58,13 @@
     echo $LINE | grep '^ZFS' >/dev/null 2>/dev/null
     if [ "$?" = "0" ] ; then
       ZTYPE="NONE"
-      ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1`"
+      ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`"
 
-      # Check if we are doing raidz setup
-      echo $ZFSVARS | grep "^raidz:" >/dev/null 2>/dev/null
-      if [ "$?" = "0" ] ; then
-       ZTYPE="raidz" 
-       ZFSVARS="`echo $ZFSVARS | sed 's|raidz: ||g' | sed 's|raidz:||g'`"
-      fi
-
-      echo $ZFSVARS | grep "^mirror:" >/dev/null 2>/dev/null
-      if [ "$?" = "0" ] ; then
-        ZTYPE="mirror" 
-        ZFSVARS="`echo $ZFSVARS | sed 's|mirror: ||g' | sed 's|mirror:||g'`"
-      fi
+      echo $ZFSVARS | grep -E "^(disk|file|mirror|raidz(1|2)?|spare|log|cache):" >/dev/null 2>/dev/null
+	  if [ "$?" = "0" ] ; then
+       ZTYPE=`echo $ZFSVARS | cut -f1 -d:`
+       ZFSVARS=`echo $ZFSVARS | sed "s|$ZTYPE: ||g" | sed "s|$ZTYPE:||g"`
+	  fi
 
       # Return the ZFS options
       if [ "${ZTYPE}" = "NONE" ] ; then


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Aug 12 23:48:25 UTC 2010 
Responsible-Changed-Why:  
Let's let imp look at this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149599 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Thu Aug 19 00:06:09 MDT 2010 
State-Changed-Why:  
Committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149599 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/149599: commit references a PR
Date: Thu, 19 Aug 2010 06:09:52 +0000 (UTC)

 Author: imp
 Date: Thu Aug 19 06:05:05 2010
 New Revision: 211488
 URL: http://svn.freebsd.org/changeset/base/211488
 
 Log:
   Simple patch to add support zpool virtual devices that are not
   currently supported.
   
   PR:		149599
   Submitted by:	John Hixson
 
 Modified:
   head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
 
 Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
 ==============================================================================
 --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh	Thu Aug 19 06:02:31 2010	(r211487)
 +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh	Thu Aug 19 06:05:05 2010	(r211488)
 @@ -58,20 +58,13 @@ get_fs_line_xvars()
      echo $LINE | grep '^ZFS' >/dev/null 2>/dev/null
      if [ "$?" = "0" ] ; then
        ZTYPE="NONE"
 -      ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1`"
 +      ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`"
  
 -      # Check if we are doing raidz setup
 -      echo $ZFSVARS | grep "^raidz:" >/dev/null 2>/dev/null
 -      if [ "$?" = "0" ] ; then
 -       ZTYPE="raidz" 
 -       ZFSVARS="`echo $ZFSVARS | sed 's|raidz: ||g' | sed 's|raidz:||g'`"
 -      fi
 -
 -      echo $ZFSVARS | grep "^mirror:" >/dev/null 2>/dev/null
 -      if [ "$?" = "0" ] ; then
 -        ZTYPE="mirror" 
 -        ZFSVARS="`echo $ZFSVARS | sed 's|mirror: ||g' | sed 's|mirror:||g'`"
 -      fi
 +      echo $ZFSVARS | grep -E "^(disk|file|mirror|raidz(1|2)?|spare|log|cache):" >/dev/null 2>/dev/null
 +	  if [ "$?" = "0" ] ; then
 +       ZTYPE=`echo $ZFSVARS | cut -f1 -d:`
 +       ZFSVARS=`echo $ZFSVARS | sed "s|$ZTYPE: ||g" | sed "s|$ZTYPE:||g"`
 +	  fi
  
        # Return the ZFS options
        if [ "${ZTYPE}" = "NONE" ] ; then
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
