Simple patch to add support zpool virtual devices that are not

currently supported.

PR:		149599
Submitted by:	John Hixson
This commit is contained in:
Warner Losh 2010-08-19 06:05:05 +00:00
parent 6784d5cdbd
commit a13642d62d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211488

View file

@ -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