Changeset 309 in MondoRescue for trunk/mindi


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

merge -r303:308 $SVN_M/branches/2.06

Location:
trunk/mindi
Files:
4 edited
1 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
Note: See TracChangeset for help on using the changeset viewer.