Changeset 2448

Show
Ignore:
Timestamp:
10/05/09 11:06:13 (10 months ago)
Author:
bruno
Message:

- Fix for #288: only take the first result in SizeOfPartition? in case of multiple mounts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.2.9/mindi/mindi

    r2447 r2448  
    17081708        return 0 
    17091709    fi 
    1710     free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 
    17111710    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 
    17121711    echo "Free space left on image = $free_space KB" >> $LOGFILE 
     
    18031802        return 0 
    18041803    fi 
    1805     free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 
    18061804    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 
    18071805    echo "Free space left on image = $free_space KB" >> $LOGFILE 
     
    20462044    res=`$FDISK -s $device 2>> $LOGFILE` 
    20472045    # end patch 
    2048     [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2` 
     2046    # take only the first in case of multiple mount (cifs, nfs, ...) 
     2047    [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2 | head -1` 
    20492048    [ "$res" = "" ] && res="-1" 
    20502049    echo $res