Ignore:
Timestamp:
04/15/13 12:29:41 (17 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.1-release, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
4d2a365
Parents:
9bf0d71
Message:

Add patch from John Hixson which corrects some bugs figuring out which ZFS
dataset we are pulling from

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/libsh/functions.sh

    r1f0939e rc3f709f  
    356356getZFSTank() { 
    357357  local _chkDir="$1" 
     358 
     359  _chkdir=${_chkDir%/} 
    358360  while : 
    359361  do 
    360      line=`mount | grep -we "$_chkDir" | grep -e "(zfs,"` 
    361      mount | grep -we "$_chkDir" | grep -q -e "(zfs," 
    362      if [ $? -eq 0 ] ; then 
    363         echo $line | cut -d '/' -f -1 | awk '{print $1}' 
     362     zpath=`zfs list | awk -v path="${_chkDir}" '$5 == path { print $1 }'` 
     363     if [ -n "${zpath}" ] ; then 
     364        echo $zpath | cut -f1 -d '/' 
    364365        return 0 
    365366     fi 
Note: See TracChangeset for help on using the changeset viewer.