diff options
author | imp <imp@FreeBSD.org> | 2010-08-19 06:05:05 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-08-19 06:05:05 +0000 |
commit | 3f6646190ffb4805ef690bf3522b69f940a71a09 (patch) | |
tree | 8471d36906713d8864b458656ed47c32fba84139 /usr.sbin | |
parent | e2d4a5a85f565d5d5a6b1e0ccd682f0d79e0d8a2 (diff) | |
download | FreeBSD-src-3f6646190ffb4805ef690bf3522b69f940a71a09.zip FreeBSD-src-3f6646190ffb4805ef690bf3522b69f940a71a09.tar.gz |
Simple patch to add support zpool virtual devices that are not
currently supported.
PR: 149599
Submitted by: John Hixson
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh b/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh index c974ac8..e645263 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh @@ -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 |