Changeset 687 in MondoRescue
- Timestamp:
- Jul 17, 2006, 3:39:42 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/ChangeLog
r672 r687 3 3 MINDI CHANGES 4 4 5 1.0. 8-4 (2006-06-10)5 1.0.9 (2006-06-26) 6 6 - nfsmount option added to allow redeployment from another NFS server (Bruno Cornec) 7 - Replaced all occurrences of egrep with 'grep -E' and of fgrep with 'grep -F' (Andree Leidenfrost) 8 - Fix a bug in analyze-my-lvm for RHEL3 where vgdisplay prints an additional 9 field sometimes (#) (severine.lombardo_at_acoss.fr/Bruno Cornec) 10 - Deal properly with LVM tool lvmiopversion and with lvmcreate_initrd and pvdata - fixes Debian bug #351687 (Andree Leidenfrost) 11 - Handle the format /dev/mapper/<VG>-<LV> for LVM devices - fix for Debian bug #362926 (Andree Leidenfrost) 7 12 8 13 1.0.8-3 (2006-06-07) -
trunk/mindi/README.pxe
r672 r687 22 22 mountpoint is the mount point on the NFS server to use (should be in /etc/exports of the NFS server) 23 23 24 The initrd and kernel file come rom the first bootable media24 The initrd and kernel file come from the first bootable media 25 25 created by mondoarchive. To get them, please issue: 26 26 -
trunk/mindi/analyze-my-lvm
r350 r687 1 #!/bin/ sh1 #!/bin/bash 2 2 # 3 3 # $Id$ … … 169 169 170 170 ListLvmDrivesAndPartitions() { 171 $LVMCMD vgdisplay -v |grep "PV Name" | awk '{print $3}'171 $LVMCMD vgdisplay -v |grep "PV Name" | sed 's/(#)//' | awk '{print $3}' 172 172 } 173 173 -
trunk/mindi/mindi
r618 r687 206 206 207 207 AbortIfMkfsVfatMissing() { 208 #if fgrep"vfat" /etc/fstab &> /dev/null ; then208 #if grep -F "vfat" /etc/fstab &> /dev/null ; then 209 209 if ! which mkfs.vfat &> /dev/null ; then 210 210 Die "mkfs.vfat missing from your filesystem - please install your dosfstools RPM or DEB package. Perhaps your PATH environmental variable is broken, too?" … … 303 303 mkdir -p $bigdir/etc 304 304 cp --parents -pRdf $mappath $bigdir || LogIt "AKMF -- Could not copy $mappath to $bigdir\n" 305 if [ "`echo $mappath | fgrep".gz"`" ] ; then306 included_list=`gzip -dc $mappath | fgrep -i include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`307 else 308 included_list=` fgrep -i include $mappath | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`305 if [ "`echo $mappath | grep -F ".gz"`" ] ; then 306 included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` 307 else 308 included_list=`grep -Fi include $mappath | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` 309 309 fi 310 310 for included_item in $included_list ; do 311 311 if [ ! -e "$included_item" ] ; then 312 sss=`find $KEYDIR/keymaps | fgrep"${included_item}.inc"`313 [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | fgrep"$included_item"`312 sss=`find $KEYDIR/keymaps | grep -F "${included_item}.inc"` 313 [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | grep -F "$included_item"` 314 314 for ii in $sss ; do 315 315 [ -e "$ii" ] && AddKeyboardMappingFile $ii … … 340 340 scratchfile=$TMP_ROOT/blah.$$.dat 341 341 cp -f $filename $scratchfile || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?" 342 [ "`head $scratchfile -n1 | fgrep"bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"343 [ "`echo "$filename" | fgrep"etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"344 if [ "`echo "$filename" | fgrep"lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then342 [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-" 343 [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-" 344 if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then 345 345 mv $scratchfile $scratchfile.gz 346 346 gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz\n" … … 523 523 524 524 res=0 525 [ "`ps ax | fgrep"mondoarchive" | grep -v "grep"`" ] && res=$(($res+1))525 [ "`ps ax | grep -F "mondoarchive" | grep -v "grep"`" ] && res=$(($res+1)) 526 526 [ -f "/var/run/monitas-mondo.pid" ] && res=$(($res+1)) 527 527 [ "$res" -gt "1" ] && echo "yes" … … 542 542 cd / 543 543 544 my_partitions=`mount | fgrep$$ | cut -f1 -d' '`544 my_partitions=`mount | grep -F $$ | cut -f1 -d' '` 545 545 [ "$my_partitions" != "" ] && umount $my_partitions 546 546 # BCO : Too Dangerous !!! … … 589 589 ln -sf $vanilla_lib_name $outdir$optimized_lib_name 590 590 echo "Excluding $optimized_lib_name" >> $LOGFILE 591 fgrep -vx "$optimized_lib_name $filelist" > $filelist.tmp591 grep -Fvx "$optimized_lib_name $filelist" > $filelist.tmp 592 592 echo "Replacing it with $vanilla_lib_name" >> $LOGFILE 593 593 echo "$vanilla_lib_name" >> $filelist.tmp … … 647 647 fi 648 648 echo "keyfile=$keyfile" >> $LOGFILE 649 locale=` fgrepKEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2`649 locale=`grep -F KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2` 650 650 [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'` # Slackware 651 651 echo "locale=$locale" >> $LOGFILE 652 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | fgrep"${locale}." | grep -vx " *#.*"`652 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "${locale}." | grep -vx " *#.*"` 653 653 [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"` 654 654 for i in $mp ; do … … 711 711 LILO_EXE=lilo 712 712 fi 713 $LILO_EXE -V | fgrep"21.6" > /dev/null && Die "Please upgrade LILO. Your verison has a serious bug. If you're not _using_ LILO, fine, uninstall it. :)"713 $LILO_EXE -V | grep -F "21.6" > /dev/null && Die "Please upgrade LILO. Your verison has a serious bug. If you're not _using_ LILO, fine, uninstall it. :)" 714 714 else 715 715 LILO_EXE=`which false` … … 832 832 for tool in $filelist ; do 833 833 lvmresolved=`ResolveSoftlink $tool` 834 if echo "$lvmresolved" | grep "lvmiopversion" &> /dev/null ; then 834 if [ "$tool" == "$lvmresolved" ]; then 835 echo "$tool" >> $tempfile 836 elif echo "$lvmresolved" | grep "lvmiopversion" &> /dev/null ; then 835 837 if [ "$lvmversion" = "" ] ; then 836 838 lvmversion=`$lvmresolved` … … 838 840 fi 839 841 toolstripped=`echo $tool | $AWK -F / '{print $NF;}'` 842 if [ "$lvmversion" == "200" ]; then 843 # pvdata and lvmcreate_initrd don't exist in LVM2 844 case "$toolstripped" in 845 "pvdata") 846 continue 847 ;; 848 "lvmcreate_initrd") 849 continue 850 ;; 851 esac 852 fi 840 853 toolpath="/sbin/lvm-"$lvmversion"/"$toolstripped 841 854 if [ -e "$toolpath" ] ; then … … 923 936 fi 924 937 fi 925 tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | fgrep -vx "" | sort -u | egrep -v "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile938 tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | grep -Fvx "" | sort -u | grep -Ev "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile 926 939 rm -f $tempfile $outfile.pre 927 940 [ "$res" -eq "0" ] && echo -e "\r\t\t\t\t\t\t\t\t$DONE" || echo "\nFailed." … … 1020 1033 > $outfile 1021 1034 partlist=$(mount | cut -d' ' -f1,3,5 \ 1022 | egrep -v "((none|/tmp|/ISOs|/proc|/dev/root) )|/mnt/" \1035 | grep -Ev "((none|/tmp|/ISOs|/proc|/dev/root) )|/mnt/" \ 1023 1036 | tr ' ' '|') 1024 1037 … … 1074 1087 path=$1 1075 1088 echo -en "In the directory '$path' you will find the images:-\n" 1076 for fname in `ls $path | fgrepmindi-` ; do1089 for fname in `ls $path | grep -F mindi-` ; do 1077 1090 printf "%19s " $fname 1078 1091 done … … 1103 1116 echo "module $module --> $r" >> $LOGFILE 1104 1117 [ "$r" ] && echo "$r" 1105 [ -f "$oss" ] && find $oss | fgrep$module1118 [ -f "$oss" ] && find $oss | grep -F $module 1106 1119 done 1107 1120 find /lib/modules/$kern/modules.* -type f 2> /dev/null … … 1177 1190 location=`echo "$path/$fname_to_find" | tr -s '/' '/'` 1178 1191 if echo "$location" | grep "lib/lib" 2> /dev/null ; then 1179 loclist=`find $path -maxdepth 1 | fgrep"$fname_to_find"`1192 loclist=`find $path -maxdepth 1 | grep -F "$fname_to_find"` 1180 1193 else 1181 1194 loclist=$location … … 1191 1204 done 1192 1205 # resolved=`file $location | $AWK '{print $NF;}'` 1193 # if [ "`echo "$resolved" | fgrep"/"`" = "" ] ; then1206 # if [ "`echo "$resolved" | grep -F "/"`" = "" ] ; then 1194 1207 # stub=`dirname $location` 1195 1208 # output="/$stub/$resolved $output" … … 1343 1356 partition_size partition_format outstring partition_number \ 1344 1357 partition_mountpt c_p lwm_info psz lvm_dev unofficial_outstring \ 1345 absolute_partition old_partition_fmt 1358 absolute_partition old_partition_fmt current_lvolume 1346 1359 1347 1360 echo "Your raw fstab file looks like this:-" >> $LOGFILE … … 1367 1380 if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then 1368 1381 echo -en "\rAnalyzing LVM...\r" 1369 all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep">>>" | cut -d' ' -f2-32`1382 all_partitions=`$MINDI_LIB/analyze-my-lvm | grep -F ">>>" | cut -d' ' -f2-32` 1370 1383 fi 1371 1384 all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`" 1372 1385 # echo "all partitions = $all_partitions" > /dev/stderr 1373 1386 for i in $IMAGE_DEVS ; do 1374 mount | fgrep"$i " > /dev/null 2> /dev/null && Die "Sorry, $i is already mounted! CANNOT DO IMAGEDEV on it if it's mounted."1387 mount | grep -F "$i " > /dev/null 2> /dev/null && Die "Sorry, $i is already mounted! CANNOT DO IMAGEDEV on it if it's mounted." 1375 1388 done 1376 1389 [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`" … … 1378 1391 for c_p in $all_partitions ; do 1379 1392 # echo "c_p = $c_p" > /dev/stderr 1380 [ "`echo "/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw" | fgrep "$c_p"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/scd"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/ram"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | fgrep":/"`" != "" ] && continue1381 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep"$c_p"`" ] && continue1393 [ "`echo "/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw" | grep -F "$c_p"`" != "" ] || [ "`echo "$c_p" | grep -F "/dev/scd"`" != "" ] || [ "`echo "$c_p" | grep -F "/dev/ram"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | grep -F ":/"`" != "" ] && continue 1394 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | grep -F "$c_p"`" ] && continue 1382 1395 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue 1383 if [ -h "$c_p" ] && [ "`echo "$c_p" | fgrep "/dev/hd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/sd"`" = "" ] && [ "`echo "$c_p" | fgrep"/dev/md"`" = "" ] ; then1396 if [ -h "$c_p" ] && [ "`echo "$c_p" | grep -F "/dev/hd"`" = "" ] && [ "`echo "$c_p" | grep -F "/dev/sd"`" = "" ] && [ "`echo "$c_p" | grep -F "/dev/md"`" = "" ] ; then 1384 1397 current_partition=`ResolveSoftlink $c_p` 1385 [ "`echo "$current_partition" | fgrep"/dev/mapper"`" != "" ] && current_partition="$c_p"1386 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep"$current_partition"`" ] && continue1398 [ "`echo "$current_partition" | grep -F "/dev/mapper"`" != "" ] && current_partition="$c_p" 1399 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | grep -F "$current_partition"`" ] && continue 1387 1400 else 1388 1401 current_partition="$c_p" … … 1441 1454 1442 1455 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB` 1443 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ]; then 1456 # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab 1457 # for LVM partitions but use /dev/mapper/<VG>-<LV> instead. Fortunately, 1458 # the former is then a link to the latter, so we test whether 1459 # $current_partition is actually such a link or not and set 1460 # $current_lvolume accordingly. Note that $current_lvolume may well be an 1461 # ordinary device. It is just to make sure that we feed the right value 1462 # into any of the LVM tools if possible. 1463 if [ -d "/dev/mapper" ] && [ -z "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then 1464 partition_stub="`echo "$current_partition" | sed "s|^/dev/mapper/|/dev/|" | cut -d"-" -f1`" 1465 current_lvolume="`find /dev -lname "$current_partition" | grep "^$partition_stub"`" 1466 fi 1467 if [ -z "$current_lvolume" ]; then 1468 current_lvolume="$current_partition" 1469 fi 1470 # End of LVM device style variation code (other than $current_lvolume). 1471 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_lvolume 2> /dev/null`" ]; then 1444 1472 partition_size="lvm" 1445 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_ partition2> /dev/null`" ]; then1473 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_lvolume 2> /dev/null`" ]; then 1446 1474 partition_size="lvm" 1447 1475 else … … 1450 1478 [ "`echo "$current_partition" | grep -c "^/"`" -ne "1" ] && continue 1451 1479 if [ "$partition_format" = "swap" ] || [ "$partition_mountpt" = "swap" ] ; then 1452 partition_size=` fgrep -v "Priority" /proc/swaps | tr -s '\t' ' ' | fgrep"$current_partition" | $AWK '{print $3}'`1480 partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition" | $AWK '{print $3}'` 1453 1481 [ "$partition_mountpt" != "swap" ] && partition_mountpt="swap" 1454 1482 [ "$partition_format" != "swap" ] && partition_format="swap" … … 1456 1484 totalsize=0 1457 1485 items=0 1458 for i in `tr -s ' ' '\t' < /proc/swaps | fgrep -v "Filename" | cut -f3` ; do1486 for i in `tr -s ' ' '\t' < /proc/swaps | grep -Fv "Filename" | cut -f3` ; do 1459 1487 totalsize=$(($totalsize+$i)) 1460 1488 items=$(($items+1)) … … 1469 1497 [ "$partition_format" = "swap" ] && partition_mountpt="swap" 1470 1498 if [ "$partition_mountpt" = "" ] ; then 1471 if [ "`pvdisplay $current_ partition 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_partition2> /dev/null`" != "" ] ; then1472 if [ "` fgrepdevice /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then1499 if [ "`pvdisplay $current_lvolume 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_lvolume 2> /dev/null`" != "" ] ; then 1500 if [ "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1473 1501 partition_mountpt="raid" 1474 1502 partition_format="raid" 1475 1503 else 1476 # lvm_dev="`pvdisplay $current_ partition| grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`"1504 # lvm_dev="`pvdisplay $current_lvolume | grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`" 1477 1505 partition_mountpt="lvm" 1478 1506 partition_format="lvm" … … 1483 1511 echo "Examining $current_partition (mount=$partition_mountpt fmt=$partition_format psz=$psz)" >> $LOGFILE 1484 1512 [ "$psz" != "lvm" ] && psz=$(($psz/1024)) 1485 if [ "`echo " $IMAGE_DEVS " | fgrep" $current_partition "`" != "" ] ; then1513 if [ "`echo " $IMAGE_DEVS " | grep -F " $current_partition "`" != "" ] ; then 1486 1514 partition_mountpt="image" 1487 1515 old_partition_fmt=$partition_format … … 1498 1526 fi 1499 1527 fi 1500 if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | fgrep" $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then1528 if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep -F " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then 1501 1529 echo "Excluding $current_partition from mountlist" >> $LOGFILE 1502 1530 continue … … 1512 1540 if [ "$partition_format" = "Compaq diagnostics" ] ; then 1513 1541 partition_format="compaq" 1514 elif [ ! "` fgrepdevice /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then1542 elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1515 1543 LogIt "Unable to find mountpoint of $current_partition - ignoring\n" 1516 1544 continue … … 1523 1551 echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE 1524 1552 elif [ "$partition_mountpt" = "" ] && [ -f "/etc/raidtab" ] ; then 1525 if [ "` fgrep device /etc/raidtab 2>/dev/null | fgrep$current_partition`" ] ; then1553 if [ "`grep -F device /etc/raidtab 2>/dev/null | grep -F $current_partition`" ] ; then 1526 1554 partition_mountpt=raid 1527 1555 partition_format=raid … … 1569 1597 rmdir $1 1570 1598 echo -en " " > $1 1571 if [ "` fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then1599 if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then 1572 1600 sed s/ZZZZZ/$MINDI_VERSION/ $MINDI_LIB/msg-txt | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cut -d ' ' -f 3 /etc/issue.net` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ >> $1.tmp 1573 1601 else … … 1623 1651 return 1 1624 1652 } 1625 1626 1627 1628 1653 1629 1654 … … 1709 1734 local disksize 1710 1735 disksize=$1 1711 if [ "` fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then1736 if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then 1712 1737 sed s/ZZZZZ/$MINDI_VERSION/ $MINDI_LIB/msg-txt | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cut -d ' ' -f 3 /etc/issue.net` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ 1713 1738 else … … 2000 2025 fi 2001 2026 if [ $? -ne "0" ] ; then 2002 if [ "` fgrep"/tmp/dev.0" $LOGFILE`" ] ; then2027 if [ "`grep -F "/tmp/dev.0" $LOGFILE`" ] ; then 2003 2028 LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's.\n" 2004 2029 LogIt "Please reboot your PC as a workaround.\n" … … 2454 2479 local devpath drive res stub 2455 2480 device=$1 2456 if [ "`echo "$device" | fgrep"/dev/md"`" != "" ] ; then2481 if [ "`echo "$device" | grep -F "/dev/md"`" != "" ] ; then 2457 2482 res=`SizeOfRaidPartition $device` 2458 2483 [ "$res" = "" ] && Die "Cannot find $device's size - is your /etc/raidtab sane?" … … 2467 2492 echo "------- $FDISK log end ------------" >> $LOGFILE 2468 2493 # end patch 2469 [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | fgrep"$device " | cut -d' ' -f2`2494 [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2` 2470 2495 [ "$res" = "" ] && res="-1" 2471 2496 echo $res … … 2579 2604 root="/" 2580 2605 fi 2581 for fname in `find $root -maxdepth 2 -type f | fgrep lin | egrep -v '^/proc/|^/net/'` ; do2606 for fname in `find $root -maxdepth 2 -type f | grep -F lin | grep -Ev '^/proc/|^/net/'` ; do 2582 2607 [ ! -e "$fname" ] && continue 2583 2608 [ "$fname" = "/boot/vmlinuz.shipped" ] && [ -f "/boot/vmlinuz" ] && continue; # ignore SuSE's extra kernel … … 2591 2616 [ "$fkern_ver" = "" ] && continue 2592 2617 # echo "$fname --> $fkern_ver (but we want $we_want_version)" >> /dev/stderr 2593 [ "`echo "$fkern_ver" | fgrep"$we_want_version "`" = "" ] && continue2618 [ "`echo "$fkern_ver" |grep -F "$we_want_version "`" = "" ] && continue 2594 2619 [ -f "$fname" ] || continue 2595 2620 [ -h "$fname" ] && continue … … 2598 2623 if [ "$?" -eq "0" ] ; then 2599 2624 # Used by ia64 2600 if [ "`gzip -cd $fname | strings 2> /dev/null | fgrep"$kdate"`" = "" ] ; then2625 if [ "`gzip -cd $fname | strings 2> /dev/null | grep -F "$kdate"`" = "" ] ; then 2601 2626 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it...\n" 2602 2627 duff_kernels="$fname $duff_kernels" 2603 2628 else 2604 [ "`echo "$fname" | fgrep"vmlinux"`" ] && continue2629 [ "`echo "$fname" | grep -F "vmlinux"`" ] && continue 2605 2630 possible_kernels="$fname $possible_kernels" 2606 2631 fi 2607 2632 else 2608 if [ "`strings $fname 2> /dev/null | fgrep"$kdate"`" = "" ] ; then2633 if [ "`strings $fname 2> /dev/null | grep -F "$kdate"`" = "" ] ; then 2609 2634 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it...\n" 2610 2635 duff_kernels="$fname $duff_kernels" 2611 2636 else 2612 [ "`echo "$fname" | fgrep"vmlinux"`" ] && continue2637 [ "`echo "$fname" | grep -F "vmlinux"`" ] && continue 2613 2638 possible_kernels="$fname $possible_kernels" 2614 2639 fi … … 2651 2676 fi 2652 2677 done 2653 if echo " $possible_kernels " | fgrep"/boot/vmlinuz " &> /dev/null ; then2678 if echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null ; then 2654 2679 output=/boot/vmlinuz 2655 2680 echo "Schlomo, this one's for you." >> $LOGFILE … … 2680 2705 old_pwd=`pwd` 2681 2706 cd $bigdir 2682 list_of_files=`GetFileSizeList . | sort -nr | cut -f2 | fgrep -v "/dev/"`2707 list_of_files=`GetFileSizeList . | sort -nr | cut -f2 | grep -Fv "/dev/"` 2683 2708 progress=0 2684 2709 total_files=`CountItemsIn "$list_of_files"` … … 2827 2852 echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE 2828 2853 cp -df $i $mountpoint/ || LogIt "Unable to copy $i to $mountpoint\n" 2829 [ "`echo "$i" | fgrep".gz"`" ] && gunzip -f $mountpoint/`basename $i`2854 [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i` 2830 2855 done 2831 2856 # if [ -e "/dev/.devfsd" ] ; then … … 2877 2902 WhichOfTheseModulesAreLoaded() { 2878 2903 local modname loaded_modules 2879 loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | fgrep -vx "Modules" | tr '\n' ' '` "2904 loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | grep -Fvx "Modules" | tr '\n' ' '` " 2880 2905 for modname in $1 ; do 2881 [ "`echo "$loaded_modules" | fgrep" $modname "`" ] && echo "$modname"2906 [ "`echo "$loaded_modules" | grep -F " $modname "`" ] && echo "$modname" 2882 2907 done 2883 2908 } … … 2991 3016 fi 2992 3017 FixPathIfBroken 2993 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | egrep"2\.[46]" | cut -d' ' -f1`3018 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1` 2994 3019 AbortIfMkfsVfatMissing 2995 3020 ### BCO … … 3001 3026 FindLiloBinary 3002 3027 fi 3003 fgrep " $TMP_ROOT " /proc/mounts | fgreptmpfs > /dev/null 2> /dev/null && TMP_ROOT=/home && LogIt "Changing TMP_ROOT to $TMP_ROOT because you're using tmpfs for /tmp\n" ; # tmpfs doesn't like Mindi and /tmp, for some reason3028 grep -F " $TMP_ROOT " /proc/mounts | grep -F tmpfs > /dev/null 2> /dev/null && TMP_ROOT=/home && LogIt "Changing TMP_ROOT to $TMP_ROOT because you're using tmpfs for /tmp\n" ; # tmpfs doesn't like Mindi and /tmp, for some reason 3004 3029 rm -f /tmp/mindi_lo 3005 3030 trap "Aborted" SIGTERM -
trunk/mondo/ChangeLog
r672 r687 8 8 - Internationalization (A huge thank to rene-marc dolhen <rmd_at_mecreant.org> who achieved that big task) 9 9 10 2.0. 8-4 (2006-06-10)10 2.0.9 (2006-06-26) 11 11 - nfsmount option added to allow redeployment from another NFS server (Bruno Cornec) 12 - Replaced all occurrences of egrep with 'grep -E' and of fgrep with 'grep -F' (Andree Leidenfrost) 13 - Optimize grep usage - fixes Debian bug #222052 (Andree Leidenfrost) 14 - Avoid false alerts about growisofs not running under sudo (Andree Leidenfrost) 15 - Increase PPCFG_RAMDISK_SIZE to 350 MB (Thomas Börkel/Bruno Cornec) 16 - Removed useless mondo-makefilelist (Andree Leidenfrost) 17 - Fix a segmentation fault in parse_mdstat() (Andree Leidenfrost) 18 - Fix gcc 4.1.2 warnings (Andree Leidenfrost) 12 19 13 20 2.0.8-3 (2006-06-07) -
trunk/mondo/mondo/common/libmondo-archive.c
r539 r687 1217 1217 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 1218 1218 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 1219 write_header_block_to_stream( 0, "start-of-tape",1219 write_header_block_to_stream((off_t)0, "start-of-tape", 1220 1220 BLK_START_OF_TAPE); 1221 write_header_block_to_stream( 0, "start-of-backup",1221 write_header_block_to_stream((off_t)0, "start-of-backup", 1222 1222 BLK_START_OF_BACKUP); 1223 1223 } … … 1713 1713 log_to_screen("%s...OK", message_to_screen); 1714 1714 if (!run_program_and_log_output 1715 ("tail -n10 /var/log/mondo-archive.log | fgrep':-('",1715 ("tail -n10 /var/log/mondo-archive.log | grep -F ':-('", 1716 1716 1)) { 1717 1717 log_to_screen … … 1981 1981 bool delete_when_done; 1982 1982 bool use_ntfsprog; 1983 /*@ long long ****************************************** */ 1984 long long biggie_fsize; 1983 off_t biggie_fsize; 1985 1984 1986 1985 assert(bkpinfo != NULL); … … 2081 2080 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2082 2081 tmp = calc_checksum_of_file(bigfile_fname); 2083 write_header_block_to_stream( 0, tmp, BLK_STOP_A_BIGGIE);2082 write_header_block_to_stream((off_t)0, tmp, BLK_STOP_A_BIGGIE); 2084 2083 paranoid_free(tmp); 2085 2084 } … … 2259 2258 2260 2259 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2261 write_header_block_to_stream( 0, "start-of-afioballs",2260 write_header_block_to_stream((off_t)0, "start-of-afioballs", 2262 2261 BLK_START_AFIOBALLS); 2263 2262 #if __FreeBSD__ == 5 … … 2268 2267 res = make_afioballs_and_images_OLD(bkpinfo, mrconf); 2269 2268 #endif 2270 write_header_block_to_stream( 0, "stop-afioballs",2269 write_header_block_to_stream((off_t)0, "stop-afioballs", 2271 2270 BLK_STOP_AFIOBALLS); 2272 2271 } else { … … 2344 2343 res += write_EXAT_files_to_tape(bkpinfo, xattr_fname, acl_fname); 2345 2344 asprintf(&blah, "%ld", count_lines_in_file(biggielist)); 2346 write_header_block_to_stream( 0, blah, BLK_START_BIGGIEFILES);2345 write_header_block_to_stream((off_t)0, blah, BLK_START_BIGGIEFILES); 2347 2346 paranoid_free(blah); 2348 2347 } … … 2354 2353 2355 2354 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2356 write_header_block_to_stream( 0, "end-of-biggiefiles",2355 write_header_block_to_stream((off_t)0, "end-of-biggiefiles", 2357 2356 BLK_STOP_BIGGIEFILES); 2358 2357 } … … 2720 2719 char *curr_file, *cf; 2721 2720 /*@ long long ****************************************************** */ 2722 long long length_of_incoming_file =0;2721 off_t length_of_incoming_file = (off_t)0; 2723 2722 t_archtype type; 2724 2723 va_list ap; … … 2755 2754 paranoid_free(curr_file); 2756 2755 /* write closing header */ 2757 write_header_block_to_stream( 0, "finished-writing-file", stop_chr);2756 write_header_block_to_stream((off_t)0, "finished-writing-file", stop_chr); 2758 2757 } 2759 2758 va_end(ap); … … 3035 3034 3036 3035 /*@ long long ************************************************** */ 3037 long long totalread =0;3038 long long totallength =0;3039 long longlength;3036 off_t totalread = (off_t)0; 3037 off_t totallength = (off_t)0; 3038 off_t length; 3040 3039 3041 3040 /*@ int ******************************************************** */ … … 3080 3079 strcpy (tmp, call_program_and_get_last_line_of_output(command)); 3081 3080 log_it("res of it = %s", tmp); 3082 totallength = atoll(tmp);3081 totallength = (off_t)atoll(tmp); 3083 3082 } else { 3084 3083 file_to_openin = biggie_filename; -
trunk/mondo/mondo/common/libmondo-devices.c
r507 r687 304 304 return 305 305 !system 306 ("parted2fdisk -l 2>/dev/null | grep '^/dev/' | egrep -qv '(MS|DOS|FAT|NTFS)'");306 ("parted2fdisk -l 2>/dev/null | grep '^/dev/' | grep -Eqv '(MS|DOS|FAT|NTFS)'"); 307 307 #endif 308 308 } … … 1465 1465 case dvd: 1466 1466 if (archiving_to_media) { 1467 if (ask_me_yes_or_no 1468 (_("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))) 1469 { 1470 bkpinfo->manual_cd_tray = TRUE; 1467 if (bkpinfo->backup_media_type != dvd) { 1468 if (ask_me_yes_or_no 1469 (_("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))) 1470 { 1471 bkpinfo->manual_cd_tray = TRUE; 1472 } 1471 1473 } 1472 1474 if ((bkpinfo->compression_level = … … 2065 2067 asprintf(&tmp, 2066 2068 call_program_and_get_last_line_of_output 2067 ("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 ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'")); 2068 2070 #else 2069 2071 asprintf(&tmp, 2070 2072 call_program_and_get_last_line_of_output 2071 ("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 ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs | sed 's/ /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'")); 2072 2074 #endif 2073 2075 -
trunk/mondo/mondo/common/libmondo-fifo.c
r507 r687 162 162 paranoid_system("sync"); 163 163 asprintf(&command, 164 "ps wwax | fgrep \"%s\" | fgrep -v grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'",165 164 "ps wwax | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'", 165 g_sz_call_to_buffer); 166 166 paranoid_free(g_sz_call_to_buffer); 167 167 log_msg(2, "kill_buffer() --- command = %s", command); -
trunk/mondo/mondo/common/libmondo-filelist.c
r672 r687 1300 1300 1301 1301 if (res) { 1302 log_OS_error("Call to mondo -makefilelist failed");1302 log_OS_error("Call to mondo_makefilelist failed"); 1303 1303 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1304 1304 } else { … … 1378 1378 { 1379 1379 sprintf(find_skeleton_marker, 1380 " fgrep -v \"%s\" %s > %s.new 2> /dev/null", dir,1380 "grep -Fv \"%s\" %s > %s.new 2> /dev/null", dir, 1381 1381 skeleton_filelist, skeleton_filelist); 1382 1382 // log_msg(0, "fsm = %s", find_skeleton_marker); -
trunk/mondo/mondo/common/libmondo-files-EXT.h
r171 r687 16 16 extern int grab_percentage_from_last_line_of_file(char *filename); 17 17 extern char *last_line_of_file(char *filename); 18 extern long longlength_of_file(char *filename);18 extern off_t length_of_file(char *filename); 19 19 extern int make_hole_for_file(char *outfile_fname); 20 20 extern void make_list_of_files_to_ignore(char *ignorefiles_fname, -
trunk/mondo/mondo/common/libmondo-files.c
r672 r687 435 435 if (i < 0) { 436 436 asprintf(&command, 437 "tail -n3 %s | fgrep -i \"%c\" | tail -n1 | awk '{print $0;}'",437 "tail -n3 %s | grep -Fi \"%c\" | tail -n1 | awk '{print $0;}'", 438 438 filename, '%'); 439 439 asprintf(&lastline, … … 513 513 * @return The length of the file, or -1 for error. 514 514 */ 515 long longlength_of_file(char *filename)515 off_t length_of_file(char *filename) 516 516 { 517 517 /*@ pointers *************************************************** */ … … 519 519 520 520 /*@ long long ************************************************* */ 521 long longlength;521 off_t length; 522 522 523 523 fin = fopen(filename, "r"); … … 528 528 } 529 529 fseeko(fin, 0, SEEK_END); 530 length = ftell (fin);530 length = ftello(fin); 531 531 paranoid_fclose(fin); 532 532 return (length); … … 763 763 } 764 764 } else { 765 /* BERLIOS: more than long here ??? */ 765 766 file_len_K = (long) (length_of_file(fname) / 1024); 766 767 } -
trunk/mondo/mondo/common/libmondo-files.h
r171 r687 19 19 int grab_percentage_from_last_line_of_file(char *filename); 20 20 char *last_line_of_file(char *filename); 21 long longlength_of_file(char *filename);21 off_t length_of_file(char *filename); 22 22 int make_hole_for_file(char *outfile_fname); 23 23 void make_list_of_files_to_ignore(char *ignorefiles_fname, -
trunk/mondo/mondo/common/libmondo-fork.c
r507 r687 599 599 fatal_error("Failed to malloc() tmp"); 600 600 } 601 /* BERLIOS : strange ??? 602 sprintf(tmp, "I am here - %llu", ftello(fin)); 603 log_msg(0, tmp); 604 */ 601 605 fread(tmp, 1, 512, fin); 602 606 log_msg(0, "tmp = '%s'", tmp); -
trunk/mondo/mondo/common/libmondo-stream-EXT.h
r146 r687 28 28 #endif 29 29 extern bool should_we_write_to_next_tape(long mediasize, 30 long long30 off_t 31 31 length_of_incoming_file); 32 32 extern int skip_incoming_files_until_we_find_this_one(char … … 38 38 extern int write_file_to_stream_from_file(struct s_bkpinfo *bkpinfo, 39 39 char *infile); 40 extern int write_header_block_to_stream( long longlength_of_incoming_file,40 extern int write_header_block_to_stream(off_t length_of_incoming_file, 41 41 char *filename, int control_char); 42 42 extern void wrong_marker(int should_be, int it_is); -
trunk/mondo/mondo/common/libmondo-stream.c
r507 r687 156 156 log_it("closeout_tape() -- entering"); 157 157 retval += 158 write_header_block_to_stream( 0, "end-of-backup",158 write_header_block_to_stream((off_t)0, "end-of-backup", 159 159 BLK_END_OF_BACKUP); 160 retval += write_header_block_to_stream( 0, "end-of-tape", BLK_END_OF_TAPE); /* just in case */160 retval += write_header_block_to_stream((off_t)0, "end-of-tape", BLK_END_OF_TAPE); /* just in case */ 161 161 /* write 1MB of crap */ 162 162 for (i = 0; i < 256 * 1024; i++) { … … 166 166 (void) fwrite(blk, 1, 256 * 1024, g_tape_stream); 167 167 if (should_we_write_to_next_tape 168 (bkpinfo->media_size[g_current_media_number], 256 * 1024)) {168 (bkpinfo->media_size[g_current_media_number], (off_t)256 * 1024)) { 169 169 start_to_write_to_next_tape(bkpinfo); 170 170 } … … 386 386 BLK_START_EXAT_FILE); 387 387 write_file_to_stream_from_file(bkpinfo, xattr_fname); 388 write_header_block_to_stream( -1, xattr_fname, BLK_STOP_EXAT_FILE);388 write_header_block_to_stream((off_t)-1, xattr_fname, BLK_STOP_EXAT_FILE); 389 389 // acl 390 390 write_header_block_to_stream(length_of_file(acl_fname), acl_fname, 391 391 BLK_START_EXAT_FILE); 392 392 write_file_to_stream_from_file(bkpinfo, acl_fname); 393 write_header_block_to_stream( -1, acl_fname, BLK_STOP_EXAT_FILE);393 write_header_block_to_stream((off_t)-1, acl_fname, BLK_STOP_EXAT_FILE); 394 394 write_header_block_to_stream(length_of_file(xattr_fname), xattr_fname, 395 395 BLK_STOP_EXTENDED_ATTRIBUTES); … … 1062 1062 * autodetecting the size. Huh? 1063 1063 */ 1064 1065 /* BERLIOS: Should be reviewed for mediasize being a off_t ??? */ 1064 1066 bool 1065 1067 should_we_write_to_next_tape(long mediasize, 1066 long longlength_of_incoming_file)1068 off_t length_of_incoming_file) 1067 1069 { 1068 1070 /*@ bool's ***************************************************** */ … … 1303 1305 g_tape_posK = 0; 1304 1306 g_sigpipe = FALSE; 1305 res += write_header_block_to_stream( 0, "start-of-tape", BLK_START_OF_TAPE); /* just in case */1306 res += write_header_block_to_stream( 0, "start-of-backup", BLK_START_OF_BACKUP); /* just in case */1307 res += write_header_block_to_stream((off_t)0, "start-of-tape", BLK_START_OF_TAPE); /* just in case */ 1308 res += write_header_block_to_stream((off_t)0, "start-of-backup", BLK_START_OF_BACKUP); /* just in case */ 1307 1309 return (res); 1308 1310 } … … 1343 1345 } 1344 1346 if (i != last) { 1345 write_header_block_to_stream( 0,1347 write_header_block_to_stream((off_t)0, 1346 1348 "stop-backcatalog-afio-or-slice", 1347 1349 BLK_STOP_AN_AFIO_OR_SLICE); … … 1446 1448 long i; 1447 1449 1448 /*@ long long ************************************************** */ 1449 long long filesize; 1450 off_t filesize; 1450 1451 1451 1452 #ifdef EXTRA_TAPE_CHECKSUMS … … 1521 1522 paranoid_fclose(fin); 1522 1523 asprintf(&checksum, "%04x%04x", crc16, crctt); 1523 write_header_block_to_stream(g_current_media_number, checksum, 1524 /* BERLIOS: what does it do ??? */ 1525 write_header_block_to_stream((off_t)g_current_media_number, checksum, 1524 1526 BLK_STOP_FILE); 1525 1527 paranoid_free(checksum); … … 1541 1543 */ 1542 1544 int 1543 write_header_block_to_stream( long longlength_of_incoming_file,1545 write_header_block_to_stream(off_t length_of_incoming_file, 1544 1546 char *filename, int control_char) 1545 1547 { … … 1552 1554 int i; 1553 1555 1554 /*@ long long ************************************************** */ 1555 long long olen; 1556 off_t olen; 1556 1557 1557 1558 /*@ end vars *************************************************** */ … … 1575 1576 sprintf(tempblock + 6000 + control_char, "Mondolicious, baby"); 1576 1577 tempblock[7000] = control_char; 1577 memcpy(tempblock + 7001, (char *) &olen, sizeof( long long));1578 memcpy(tempblock + 7001, (char *) &olen, sizeof(off_t)); 1578 1579 strcpy(tempblock + 1000, filename); 1579 1580 g_tape_posK += -
trunk/mondo/mondo/common/libmondo-stream.h
r59 r687 26 26 char *fn); 27 27 bool should_we_write_to_next_tape(long mediasize, 28 long longlength_of_incoming_file);28 off_t length_of_incoming_file); 29 29 int skip_incoming_files_until_we_find_this_one(char 30 30 *the_file_I_was_reading); … … 35 35 int write_file_to_stream_from_file(struct s_bkpinfo *bkpinfo, 36 36 char *infile); 37 int write_header_block_to_stream( long longlength_of_incoming_file,37 int write_header_block_to_stream(off_t length_of_incoming_file, 38 38 char *filename, int control_char); 39 39 void wrong_marker(int should_be, int it_is); -
trunk/mondo/mondo/common/libmondo-tools.c
r672 r687 362 362 assert(bkpinfo != NULL); 363 363 bkpinfo->optimal_set_size = 364 (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type) ? 4 : 8) *364 (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type) ? 16 : 16) * 365 365 1024; 366 366 … … 382 382 383 383 run_program_and_log_output("uname -a", 5); 384 run_program_and_log_output("cat /etc/*-release", 5); 384 385 run_program_and_log_output("cat /etc/*issue*", 5); 385 386 asprintf(&g_tmpfs_mountpt, "%s/tmpfs", bkpinfo->tmpdir); … … 475 476 paranoid_free(mondo_mkisofs_sz); 476 477 477 if (getenv("SUDO_COMMAND")) { 478 fatal_error 479 ("Can't write DVDs as sudo because growisofs doesn't support this - please see the growisofs manpage for details."); 478 if (getenv ("SUDO_COMMAND")) { 479 asprintf(&command, "strings `which growisofs` | grep -c SUDO_COMMAND"); 480 if (!strcmp(call_program_and_get_last_line_of_output(command), "1")) { 481 popup_and_OK("Fatal Error: Can't write DVDs as sudo because growisofs doesn't support this - see the growisofs manpage for details."); 482 fatal_error("Can't write DVDs as sudo because growisofs doesn't support this - see the growisofs manpage for details."); 483 } 484 paranoid_free(command); 480 485 } 481 486 log_msg(2, "call_make_iso (DVD res) is ... %s", … … 894 899 // abort if Windows partition but no ms-sys and parted 895 900 if (!run_program_and_log_output 896 ("mount | grep -w vfat | grep -v /dev/fd | grep -v nexdisk", 0)901 ("mount | grep -w vfat | grep -vE \"/dev/fd|nexdisk\"", 0) 897 902 || 898 903 !run_program_and_log_output 899 ("mount | grep -w dos | grep -v /dev/fd | grep -v nexdisk", 0)) {904 ("mount | grep -w dos | grep -vE \"/dev/fd|nexdisk\"", 0)) { 900 905 log_to_screen(_("I think you have a Windows 9x partition.")); 901 906 retval += whine_if_not_found("parted"); -
trunk/mondo/mondo/common/libmondo-verify.h
r171 r687 34 34 extern int grab_percentage_from_last_line_of_file(char *); 35 35 extern char *last_line_of_file(char *); 36 extern long longlength_of_file(char *);36 extern off_t length_of_file(char *); 37 37 extern void log_file_end_to_screen(char *, char *); 38 38 extern void log_tape_pos(void); -
trunk/mondo/mondo/common/my-stuff.h
r672 r687 147 147 #define NOOF_ERR_LINES 6 ///< The number of lines of log output to keep at the bottom of the screen. 148 148 #define ARBITRARY_MAXIMUM 2000 ///< The maximum number of items showing at once in the mountlist or filelist editor. 149 #define MAX_TAPECATALOG_ENTRIES 4096///< The maximum number of entries in the tape catalog.149 #define MAX_TAPECATALOG_ENTRIES 8192 ///< The maximum number of entries in the tape catalog. 150 150 #define MAX_STR_LEN 380 ///< The maximum length of almost all @p char buffers in Mondo. 151 151 #define MAXIMUM_RAID_DEVS 32 ///< The maximum number of RAID devices in the raidlist. … … 383 383 #define ARCH_BUFFER_NUM (ARCH_THREADS*4) // Number of permissible queued afio files 384 384 #define FORTY_SPACES " " ///< 40 spaces. 385 #define PPCFG_RAMDISK_SIZE 250 ///< Size of the tmpfs, in megabytes, to attempt to mount (to speed up Mondo).385 #define PPCFG_RAMDISK_SIZE 350 ///< Size of the tmpfs, in megabytes, to attempt to mount (to speed up Mondo). 386 386 387 387 #define DO_MBR_PLEASE "/tmp/DO-MBR-PLEASE" -
trunk/mondo/mondo/mondoarchive/mondo-cli.c
r649 r687 805 805 && 806 806 !run_program_and_log_output 807 (" egrep -i suse /etc/issue.net | egrep'9.0' | grep 64", TRUE)) {807 ("grep -Ei suse /etc/issue.net | grep -E '9.0' | grep 64", TRUE)) { 808 808 bkpinfo->make_cd_use_lilo = TRUE; 809 809 log_to_screen -
trunk/mondo/mondo/mondorestore/mondo-prep.c
r561 r687 1817 1817 log_msg(0, 1818 1818 "------------------- end of fdisk.log... word! ------------------"); 1819 sprintf(tmp, "tail -n6 %s | fgrep\"16: \"", FDISK_LOG);1819 sprintf(tmp, "tail -n6 %s | grep -F \"16: \"", FDISK_LOG); 1820 1820 if (!run_program_and_log_output(tmp, 5)) { 1821 1821 g_partition_table_locked_up++; -
trunk/mondo/mondo/mondorestore/mondo-restore.c
r618 r687 1980 1980 filelist_name); 1981 1981 log_msg(2, 1982 "This is a bit silly (ask dev-team to fix mondo -makefilelist, please)");1982 "This is a bit silly (ask dev-team to fix mondo_makefilelist, please)"); 1983 1983 log_msg(2, 1984 1984 "but it's non-critical. It's cosmetic. Don't worry about it."); … … 1988 1988 if (count_lines_in_file(filelist_name) <= 0 1989 1989 || length_of_file(tarball_fname) <= 0) { 1990 log_msg(3, "length_of_file(%s) = %l d", tarball_fname,1990 log_msg(3, "length_of_file(%s) = %llu", tarball_fname, 1991 1991 length_of_file(tarball_fname)); 1992 1992 sprintf(tmp, "Unable to restore fileset #%ld (CD I/O error)", -
trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c
r561 r687 582 582 } 583 583 584 if (!run_program_and_log_output("mount | fgrep" MNT_CDROM, FALSE)) {584 if (!run_program_and_log_output("mount | grep -F " MNT_CDROM, FALSE)) { 585 585 log_msg(2, "mount_cdrom() - CD already mounted. Fair enough."); 586 586 paranoid_free(mount_cmd); -
trunk/mondo/mondo/mondorestore/mondoprep.h
r561 r687 39 39 extern int strcmp_inc_numbers(char *, char *); 40 40 extern long count_lines_in_file(char *); 41 extern long longlength_of_file(char *);41 extern off_t length_of_file(char *); 42 42 extern long noof_lines_that_match_wildcard(char *, char *); 43 43 //extern char *slice_fname (long, long, bool, char *); -
trunk/mondo/mondo/mondorestore/mr-externs.h
r561 r687 36 36 extern void initialize_raid_record(struct raid_device_record *); 37 37 extern bool is_this_device_mounted(char *); 38 extern long longlength_of_file(char *);38 extern off_t length_of_file(char *); 39 39 extern char *last_line_of_file(char *); 40 40 extern struct s_node *load_filelist(char *); -
trunk/mondo/mondo/restore-scripts/mondo/make-me-bootable
r588 r687 18 18 19 19 HAVE_ACTIVE="false" 20 for i in `cat $1 | tr -s '\t' ' ' | cut -d' ' -f1 | grep -v "/dev/fd" | grep -v "none" | grep -v "#"` ; do20 for i in `cat $1 | tr -s '\t' ' ' | cut -d' ' -f1 | grep -vE "/dev/fd|none|#"` ; do 21 21 mountpt=`grep "$i " $1 | tr -s '\t' ' ' | cut -d' ' -f2` 22 22 format=`grep "$i " $1 | tr -s '\t' ' ' | cut -d' ' -f3` -
trunk/mondo/mondo/restore-scripts/mondo/mount-me
r588 r687 14 14 fi 15 15 16 paths=`grep -v " raid " $mountlist | grep -v "lvm lvm"| tr -s ' ' ' ' | cut -d' ' -f2 | sort`16 paths=`grep -vE " raid |lvm lvm" $mountlist | tr -s ' ' ' ' | cut -d' ' -f2 | sort` 17 17 > $mountlist.sorted 18 18 for i in $paths ; do -
trunk/website/downloads.shtml
r588 r687 85 85 <li>Fedora <a href="ftp://ftp.mondorescue.org/fedora/4">Core 4</a> and <a href="ftp://ftp.mondorescue.org/fedora/5">Core 5</a>.</li> 86 86 <li>RedHat Enterprise Linux <!--<a href="ftp://ftp.mondorescue.org/rhel/2.1">2.1</a>, --><a href="ftp://ftp.mondorescue.org/rhel/3">3</a>, <a href="ftp://ftp.mondorescue.org/rhel/4">4</a>.</li> 87 <li>OpenSuSE <a href="ftp://ftp.mondorescue.org/suse/9.3">9.3</a>, <a href="ftp://ftp.mondorescue.org/suse/10.0">10.0</a>. Look also at <a href="http://www.mikenjane.net/~mike/">this</a> web page for SuSE details. 87 <li>OpenSuSE <a href="ftp://ftp.mondorescue.org/suse/9.3">9.3</a>, <a href="ftp://ftp.mondorescue.org/suse/10.0">10.0</a>. Look also at <a href="http://www.mikenjane.net/~mike/">this</a> web page for SuSE details. <a href="http://packman.links2linux.org/">Packman</a> may have some useful additional packages. 88 88 <li>SuSE Linux Enterprise Server <a href="ftp://ftp.mondorescue.org/sles/9">9</a>.</li> 89 89 <li>Debian <a href="ftp://ftp.mondorescue.org/debian/3.1">3.1</a>. Look also at <a href="http://www.desknow.com/desknow/directfiles/aleidenfrost/mr-debs-unofficial/index.html">this</a> web page for Debian details.</li>
Note:
See TracChangeset
for help on using the changeset viewer.