Changeset 305 in MondoRescue for branches/2.06/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

Location:
branches/2.06/mindi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mindi/aux-tools/sbin/format-and-kludge-vfat

    r273 r305  
    107107[ ! -e "/mnt/tmpK" ] && mkdir /mnt/tmpK
    108108mount $device -t vfat /mnt/tmpK || Die "Can't mount device $device"
    109 size=`df -m /mnt/tmpK | tr -s ' ' ' ' | cut -d' ' -f2 | tail -n 1`
     109size=`df -m -P /mnt/tmpK | tr -s ' ' ' ' | cut -d' ' -f2 | tail -n 1`
    110110umount /mnt/tmpK || Die "Can't unmount /mnt/tmpK"
    111111
  • 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
  • branches/2.06/mindi/rootfs/sbin/init

    r287 r305  
    342342
    343343HowMuchFreeSpaceOnRamdisk() {
    344    df -m | grep /dev/ram | head -n1 | tr -s '\t' ' ' | cut -d' ' -f4
     344   df -m -P | grep /dev/ram | head -n1 | tr -s '\t' ' ' | cut -d' ' -f4
    345345}
    346346
Note: See TracChangeset for help on using the changeset viewer.