Changeset 309 in MondoRescue for trunk/mindi
- Timestamp:
- Jan 13, 2006, 12:23:00 AM (19 years ago)
- Location:
- trunk/mindi
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/aux-tools/sbin/format-and-kludge-vfat
r274 r309 107 107 [ ! -e "/mnt/tmpK" ] && mkdir /mnt/tmpK 108 108 mount $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`109 size=`df -m -P /mnt/tmpK | tr -s ' ' ' ' | cut -d' ' -f2 | tail -n 1` 110 110 umount /mnt/tmpK || Die "Can't unmount /mnt/tmpK" 111 111 -
trunk/mindi/install.sh
r272 r309 34 34 MANDIR=$local/share/man/man8 35 35 36 ARCH=`/bin/arch` 37 echo $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 39 echo $ARCH | grep -x "x86_64" &> /dev/null && ARCH=i386 && locallib=$local/lib64 40 export ARCH 41 36 42 echo "Creating target directories ..." 37 install -m 755 -d $conf $local /lib/mindi $MANDIR $local/sbin $DOCDIR43 install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $DOCDIR 38 44 39 45 echo "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/mindi46 install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $locallib/mindi 41 47 install -m 644 deplist.txt $conf 42 48 43 cp -af rootfs aux-tools Mindi $local /lib/mindi44 chmod 755 $local /lib/mindi/rootfs/bin/*45 chmod 755 $local /lib/mindi/rootfs/sbin/*46 chmod 755 $local /lib/mindi/aux-tools/sbin/*49 cp -af rootfs aux-tools Mindi $locallib/mindi 50 chmod 755 $locallib/mindi/rootfs/bin/* 51 chmod 755 $locallib/mindi/rootfs/sbin/* 52 chmod 755 $locallib/mindi/aux-tools/sbin/* 47 53 48 54 if [ "$RPMBUILDMINDI" = "true" ]; then … … 57 63 install -m 644 ChangeLog COPYING README README.busybox README.ia64 README.pxe TODO INSTALL $DOCDIR 58 64 59 ARCH=`/bin/arch`60 echo $ARCH | grep -x "i[0-9]86" &> /dev/null && ARCH=i38661 # For the moment, we don't build specific x86_64 busybox binaries62 echo $ARCH | grep -x "x86_64" &> /dev/null && ARCH=i38663 export ARCH64 65 65 # Managing busybox 66 if [ -f $local /lib/mindi/rootfs/bin/busybox-$ARCH ]; then66 if [ -f $locallib/mindi/rootfs/bin/busybox-$ARCH ]; then 67 67 echo "Installing busybox ..." 68 install -s -m 755 $local /lib/mindi/rootfs/bin/busybox-$ARCH $local/lib/mindi/rootfs/bin/busybox68 install -s -m 755 $locallib/mindi/rootfs/bin/busybox-$ARCH $locallib/mindi/rootfs/bin/busybox 69 69 else 70 70 echo "WARNING: no busybox found, mindi will not work on this arch ($ARCH)" 71 71 fi 72 72 if [ "$ARCH" = "i386" ] ; then 73 if [ -f $local /lib/mindi/rootfs/bin/busybox-$ARCH.net ]; then73 if [ -f $locallib/mindi/rootfs/bin/busybox-$ARCH.net ]; then 74 74 echo "Installing busybox.net ..." 75 install -s -m 755 $local /lib/mindi/rootfs/bin/busybox-$ARCH.net $local/lib/mindi/rootfs/bin/busybox.net75 install -s -m 755 $locallib/mindi/rootfs/bin/busybox-$ARCH.net $locallib/mindi/rootfs/bin/busybox.net 76 76 else 77 77 echo "WARNING: no busybox.net found, mindi will not work on this arch ($ARCH) with network" … … 79 79 fi 80 80 # Remove left busybox 81 rm -f $local /lib/mindi/rootfs/bin/busybox-*81 rm -f $locallib/mindi/rootfs/bin/busybox-* 82 82 83 83 # Managing parted2fdisk 84 84 if [ "$ARCH" = "ia64" ] ; then 85 85 (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk) 86 make -f Makefile.parted2fdisk DEST=$local /lib/mindi install87 if [ -f $local /lib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then86 make -f Makefile.parted2fdisk DEST=$locallib/mindi install 87 if [ -f $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then 88 88 echo "Installing parted2fdisk ..." 89 install -s -m 755 $local /lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/lib/mindi/rootfs/sbin/parted2fdisk90 install -s -m 755 $local /lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/sbin/parted2fdisk89 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 91 91 else 92 92 echo "WARNING: no parted2fdisk found, mindi will not work on this arch ($ARCH)" … … 96 96 (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk) 97 97 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) 99 99 fi 100 100 # Remove left parted2fdisk 101 rm -f $local /lib/mindi/rootfs/sbin/parted2fdisk-*101 rm -f $locallib/mindi/rootfs/sbin/parted2fdisk-* 102 102 103 103 if [ "$RPMBUILDMINDI" != "true" ]; then 104 chown -R root:root $local /lib/mindi $conf $DOCDIR104 chown -R root:root $locallib/mindi $conf $DOCDIR 105 105 chown root:root $local/sbin/mindi $MANDIR/mindi.8 $local/sbin/analyze-my-lvm $local/sbin/parted2fdisk.pl 106 106 if [ "$ARCH" = "ia64" ] ; then -
trunk/mindi/mindi
r304 r309 1901 1901 rm -Rf $mountpoint/lost+found 1902 1902 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` 1904 1904 cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2> /dev/null 1905 1905 if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then … … 1924 1924 return $res 1925 1925 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` 1927 1927 max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 1928 1928 echo "Free space left on floppy = $free_space KB" >> $LOGFILE … … 2038 2038 rm -Rf $mountpoint/lost+found 2039 2039 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` 2041 2041 cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null 2042 2042 if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then … … 2061 2061 return $res 2062 2062 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` 2064 2064 max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 2065 2065 echo "Free space left on floppy = $free_space KB" >> $LOGFILE … … 2410 2410 echo "------- $FDISK log end ------------" >> $LOGFILE 2411 2411 # 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` 2413 2413 [ "$res" = "" ] && res="-1" 2414 2414 echo $res -
trunk/mindi/rootfs/sbin/init
r288 r309 342 342 343 343 HowMuchFreeSpaceOnRamdisk() { 344 df -m | grep /dev/ram | head -n1 | tr -s '\t' ' ' | cut -d' ' -f4344 df -m -P | grep /dev/ram | head -n1 | tr -s '\t' ' ' | cut -d' ' -f4 345 345 } 346 346
Note:
See TracChangeset
for help on using the changeset viewer.