Changeset 309 in MondoRescue


Ignore:
Timestamp:
Jan 13, 2006, 12:23:00 AM (18 years ago)
Author:
bcornec
Message:

merge -r303:308 $SVN_M/branches/2.06

Location:
trunk
Files:
10 edited
2 copied

Legend:

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

    r274 r309  
    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
  • trunk/mindi/install.sh

    r272 r309  
    3434MANDIR=$local/share/man/man8
    3535
     36ARCH=`/bin/arch`
     37echo $ARCH | grep -x "i[0-9]86" &> /dev/null && ARCH=i386 && locallib=$local/lib
     38# For the moment, we don't build specific x86_64 busybox binaries
     39echo $ARCH | grep -x "x86_64" &> /dev/null && ARCH=i386 && locallib=$local/lib64
     40export ARCH
     41
    3642echo "Creating target directories ..."
    37 install -m 755 -d $conf $local/lib/mindi $MANDIR $local/sbin $DOCDIR
     43install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $DOCDIR
    3844
    3945echo "Copying files ..."
    40 install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $local/lib/mindi
     46install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $locallib/mindi
    4147install -m 644 deplist.txt $conf
    4248
    43 cp -af rootfs aux-tools Mindi $local/lib/mindi
    44 chmod 755 $local/lib/mindi/rootfs/bin/*
    45 chmod 755 $local/lib/mindi/rootfs/sbin/*
    46 chmod 755 $local/lib/mindi/aux-tools/sbin/*
     49cp -af rootfs aux-tools Mindi $locallib/mindi
     50chmod 755 $locallib/mindi/rootfs/bin/*
     51chmod 755 $locallib/mindi/rootfs/sbin/*
     52chmod 755 $locallib/mindi/aux-tools/sbin/*
    4753
    4854if [ "$RPMBUILDMINDI" = "true" ]; then
     
    5763install -m 644 ChangeLog COPYING README README.busybox README.ia64 README.pxe TODO INSTALL $DOCDIR
    5864
    59 ARCH=`/bin/arch`
    60 echo $ARCH | grep -x "i[0-9]86" &> /dev/null && ARCH=i386
    61 # For the moment, we don't build specific x86_64 busybox binaries
    62 echo $ARCH | grep -x "x86_64" &> /dev/null && ARCH=i386
    63 export ARCH
    64 
    6565# Managing busybox
    66 if [ -f $local/lib/mindi/rootfs/bin/busybox-$ARCH ]; then
     66if [ -f $locallib/mindi/rootfs/bin/busybox-$ARCH ]; then
    6767        echo "Installing busybox ..."
    68         install -s -m 755 $local/lib/mindi/rootfs/bin/busybox-$ARCH $local/lib/mindi/rootfs/bin/busybox
     68        install -s -m 755 $locallib/mindi/rootfs/bin/busybox-$ARCH $locallib/mindi/rootfs/bin/busybox
    6969else
    7070        echo "WARNING: no busybox found, mindi will not work on this arch ($ARCH)"
    7171fi
    7272if [ "$ARCH" = "i386" ] ; then
    73     if [ -f $local/lib/mindi/rootfs/bin/busybox-$ARCH.net ]; then
     73    if [ -f $locallib/mindi/rootfs/bin/busybox-$ARCH.net ]; then
    7474        echo "Installing busybox.net ..."
    75         install -s -m 755 $local/lib/mindi/rootfs/bin/busybox-$ARCH.net $local/lib/mindi/rootfs/bin/busybox.net
     75        install -s -m 755 $locallib/mindi/rootfs/bin/busybox-$ARCH.net $locallib/mindi/rootfs/bin/busybox.net
    7676    else
    7777        echo "WARNING: no busybox.net found, mindi will not work on this arch ($ARCH) with network"
     
    7979fi
    8080# Remove left busybox
    81 rm -f $local/lib/mindi/rootfs/bin/busybox-*
     81rm -f $locallib/mindi/rootfs/bin/busybox-*
    8282
    8383# Managing parted2fdisk
    8484if [ "$ARCH" = "ia64" ] ; then
    8585    (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
    86     make -f Makefile.parted2fdisk DEST=$local/lib/mindi install
    87     if [ -f $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then
     86    make -f Makefile.parted2fdisk DEST=$locallib/mindi install
     87    if [ -f $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then
    8888        echo "Installing parted2fdisk ..."
    89         install -s -m 755 $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/lib/mindi/rootfs/sbin/parted2fdisk
    90         install -s -m 755 $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/sbin/parted2fdisk
     89        install -s -m 755 $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH $locallib/mindi/rootfs/sbin/parted2fdisk
     90        install -s -m 755 $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/sbin/parted2fdisk
    9191    else
    9292        echo "WARNING: no parted2fdisk found, mindi will not work on this arch ($ARCH)"
     
    9696    (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk)
    9797    echo "Symlinking fdisk to parted2fdisk"
    98     ( cd $local/lib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
     98    ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
    9999fi
    100100# Remove left parted2fdisk
    101 rm -f $local/lib/mindi/rootfs/sbin/parted2fdisk-*
     101rm -f $locallib/mindi/rootfs/sbin/parted2fdisk-*
    102102
    103103if [ "$RPMBUILDMINDI" != "true" ]; then
    104     chown -R root:root $local/lib/mindi $conf $DOCDIR
     104    chown -R root:root $locallib/mindi $conf $DOCDIR
    105105    chown root:root $local/sbin/mindi $MANDIR/mindi.8 $local/sbin/analyze-my-lvm $local/sbin/parted2fdisk.pl
    106106    if [ "$ARCH" = "ia64" ] ; then
  • trunk/mindi/mindi

    r304 r309  
    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
  • trunk/mindi/rootfs/sbin/init

    r288 r309  
    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
  • trunk/mondo/ChangeLog

    r300 r309  
    2020- Replaced partimagehack with ntfsclone from ntfsprogs package.
    2121  (Andree Leidenfrost)
     22- use df -P everywhere (Bruno Cornec)
    2223
    2324v2.06 (2005-12-23)
  • trunk/mondo/mondo/common/libmondo-archive.c

    r300 r309  
    391391    if (g_tmpfs_mountpt[0] != '\0') {
    392392        i = atoi(call_program_and_get_last_line_of_output
    393                  ("df -m | grep dev/shm | grep -v none | tr -s ' ' '\t' | cut -f4"));
     393                 ("df -m -P | grep dev/shm | grep -v none | tr -s ' ' '\t' | cut -f4"));
    394394        if (i > 0) {
    395395            if (free_ramdisk_space > i) {
  • trunk/mondo/mondo/common/libmondo-devices.c

    r276 r309  
    20662066    asprintf(&tmp,
    20672067           call_program_and_get_last_line_of_output
    2068            ("df -m -t nonfs,msdosfs,ntfs,smbfs,smb,cifs | tr -s '\t' ' ' | grep -v none | grep -v Filesystem | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
     2068           ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs | tr -s '\t' ' ' | grep -v none | grep -v Filesystem | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
    20692069#else
    20702070    asprintf(&tmp,
    20712071           call_program_and_get_last_line_of_output
    2072            ("df -m -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -v none | grep -v Filesystem | grep -v /dev/shm | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
     2072           ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -v none | grep -v Filesystem | grep -v /dev/shm | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
    20732073#endif
    20742074
  • trunk/mondo/mondo/common/libmondo-tools.c

    r276 r309  
    782782    assert_string_is_neither_NULL_nor_zerolength(partition);
    783783
    784     asprintf(&command, "df -m %s &> /dev/null", partition);
     784    asprintf(&command, "df -m -P %s &> /dev/null", partition);
    785785    if (system(command)) {
    786786        return (-1);
     
    788788    paranoid_free(command);
    789789
    790     asprintf(&command, "df -m %s | tail -n1 | tr -s ' ' '\t' | cut -f4",
     790    asprintf(&command, "df -m -P %s | tail -n1 | tr -s ' ' '\t' | cut -f4",
    791791             partition);
    792792    asprintf(&out_sz, call_program_and_get_last_line_of_output(command));
  • trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c

    r274 r309  
    451451        strcat(mount_isodir_command, " -o ro ");
    452452        strcat(mount_isodir_command, bkpinfo->isodir);
    453         run_program_and_log_output("df -m", FALSE);
     453        run_program_and_log_output("df -P -m", FALSE);
    454454        sprintf(tmp,
    455455                "The 'mount' command is '%s'. PLEASE report this command to be if you have problems, ok?",
     
    635635    }
    636636    close_progress_form();
    637     run_program_and_log_output("df -m", TRUE);
     637    run_program_and_log_output("df -P -m", TRUE);
    638638    if (retval) {
    639639        if (g_partition_table_locked_up > 0) {
     
    661661        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    662662    }
    663     run_program_and_log_output("df -m", 3);
     663    run_program_and_log_output("df -P -m", 3);
    664664    paranoid_free(mountlist);
    665665    paranoid_free(tmp);
     
    22212221    sort_mountlist_by_mountpoint(mountlist, 0);
    22222222
    2223     run_program_and_log_output("df -m", 3);
     2223    run_program_and_log_output("df -P -m", 3);
    22242224    mvaddstr_and_log_it(g_currentY, 0, "Unmounting devices      ");
    22252225    open_progress_form("Unmounting devices",
  • trunk/mondo/mondo/restore-scripts/mondo/grub-install.patched

    r30 r309  
    257257    # For now, this uses the program `df' to get the device name, but is
    258258    # this really portable?
    259     tmp_fname=`df $1/ | sed -n 's%.*\(/dev/[^   ]*\).*%\1%p'`
     259    tmp_fname=`df -P $1/ | sed -n 's%.*\(/dev/[^    ]*\).*%\1%p'`
    260260
    261261    if test -z "$tmp_fname"; then
Note: See TracChangeset for help on using the changeset viewer.