Changeset 305 in MondoRescue for branches/2.06/mindi/mindi


Ignore:
Timestamp:
Jan 12, 2006, 5:37:42 PM (18 years ago)
Author:
bcornec
Message:

use df -P everywhere to avoid split lines on df output and some bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mindi/mindi

    r303 r305  
    19011901    rm -Rf $mountpoint/lost+found
    19021902    dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null
    1903     free_space=`df -k $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
     1903    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    19041904    cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2> /dev/null
    19051905    if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then
     
    19241924    return $res
    19251925    fi
    1926     free_space=`df -k $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
     1926    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    19271927    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    19281928    echo "Free space left on floppy = $free_space KB" >> $LOGFILE
     
    20382038    rm -Rf $mountpoint/lost+found
    20392039    dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null
    2040     free_space=`df -k $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
     2040    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    20412041    cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
    20422042    if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then
     
    20612061        return $res
    20622062    fi
    2063     free_space=`df -k $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
     2063    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    20642064    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    20652065    echo "Free space left on floppy = $free_space KB" >> $LOGFILE
     
    24102410    echo "------- $FDISK log end ------------" >> $LOGFILE
    24112411# end patch
    2412     [ "$res" = "" ] && res=`df -k -x supermount | tr -s '\t' ' ' | fgrep "$device " | cut -d' ' -f2`
     2412    [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | fgrep "$device " | cut -d' ' -f2`
    24132413    [ "$res" = "" ] && res="-1"
    24142414    echo $res
Note: See TracChangeset for help on using the changeset viewer.