- Timestamp:
- Jan 13, 2006, 12:23:00 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
- 2 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 -
trunk/mondo/ChangeLog
r300 r309 20 20 - Replaced partimagehack with ntfsclone from ntfsprogs package. 21 21 (Andree Leidenfrost) 22 - use df -P everywhere (Bruno Cornec) 22 23 23 24 v2.06 (2005-12-23) -
trunk/mondo/mondo/common/libmondo-archive.c
r300 r309 391 391 if (g_tmpfs_mountpt[0] != '\0') { 392 392 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")); 394 394 if (i > 0) { 395 395 if (free_ramdisk_space > i) { -
trunk/mondo/mondo/common/libmondo-devices.c
r276 r309 2066 2066 asprintf(&tmp, 2067 2067 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;}'")); 2069 2069 #else 2070 2070 asprintf(&tmp, 2071 2071 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;}'")); 2073 2073 #endif 2074 2074 -
trunk/mondo/mondo/common/libmondo-tools.c
r276 r309 782 782 assert_string_is_neither_NULL_nor_zerolength(partition); 783 783 784 asprintf(&command, "df -m %s &> /dev/null", partition);784 asprintf(&command, "df -m -P %s &> /dev/null", partition); 785 785 if (system(command)) { 786 786 return (-1); … … 788 788 paranoid_free(command); 789 789 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", 791 791 partition); 792 792 asprintf(&out_sz, call_program_and_get_last_line_of_output(command)); -
trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c
r274 r309 451 451 strcat(mount_isodir_command, " -o ro "); 452 452 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); 454 454 sprintf(tmp, 455 455 "The 'mount' command is '%s'. PLEASE report this command to be if you have problems, ok?", … … 635 635 } 636 636 close_progress_form(); 637 run_program_and_log_output("df - m", TRUE);637 run_program_and_log_output("df -P -m", TRUE); 638 638 if (retval) { 639 639 if (g_partition_table_locked_up > 0) { … … 661 661 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 662 662 } 663 run_program_and_log_output("df - m", 3);663 run_program_and_log_output("df -P -m", 3); 664 664 paranoid_free(mountlist); 665 665 paranoid_free(tmp); … … 2221 2221 sort_mountlist_by_mountpoint(mountlist, 0); 2222 2222 2223 run_program_and_log_output("df - m", 3);2223 run_program_and_log_output("df -P -m", 3); 2224 2224 mvaddstr_and_log_it(g_currentY, 0, "Unmounting devices "); 2225 2225 open_progress_form("Unmounting devices", -
trunk/mondo/mondo/restore-scripts/mondo/grub-install.patched
r30 r309 257 257 # For now, this uses the program `df' to get the device name, but is 258 258 # 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'` 260 260 261 261 if test -z "$tmp_fname"; then
Note:
See TracChangeset
for help on using the changeset viewer.