Changeset 274 in MondoRescue for trunk/mindi
- Timestamp:
- Jan 3, 2006, 4:15:54 PM (19 years ago)
- Location:
- trunk/mindi
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/aux-tools/sbin/format-and-kludge-vfat
r197 r274 110 110 umount /mnt/tmpK || Die "Can't unmount /mnt/tmpK" 111 111 112 ideal_size=` cat /tmp/mountlist.txt | grep "$device "| tr -s ' ' ' ' | cut -d' ' -f4`112 ideal_size=`grep "$device " /tmp/mountlist.txt | tr -s ' ' ' ' | cut -d' ' -f4` 113 113 if [ "$ideal_size" = "" ]; then 114 114 LogIt "format-and-kludge-vfat --- can't find $device in mountlist" 1 -
trunk/mindi/mindi
r262 r274 244 244 included_list=`gzip -dc $mappath | fgrep -i include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` 245 245 else 246 included_list=` cat $mappath | fgrep -i include| sed s/'"'// | sed s/'"'// | cut -d' ' -f2`246 included_list=`fgrep -i include $mappath | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` 247 247 fi 248 248 for included_item in $included_list ; do … … 313 313 if [ ! -f "$copy_from" ] ; then 314 314 LogIt "OK, you don't have a /boot/boot.b file, which is odd because\n most _good_ Linux distributions come with one, even if it's only a softlink" 315 copy_from=` cat /etc/lilo.conf | grep install=| grep "\.b" | cut -d'=' -f2`315 copy_from=`grep install= /etc/lilo.conf | grep "\.b" | cut -d'=' -f2` 316 316 if [ ! -f "$copy_from" ] ; then 317 317 LogIt "Nor can I find it from your /etc/lilo.conf file. This is very odd.\n" … … 505 505 outdir=$2 506 506 507 list_of_optimized_libraries=` cat $filelist | grep "lib/i[5-7]86/"`507 list_of_optimized_libraries=`grep "lib/i[5-7]86/" $filelist` 508 508 if [ "$list_of_optimized_libraries" = "" ] ; then 509 509 return 0 … … 526 526 ln -sf $vanilla_lib_name $outdir$optimized_lib_name 527 527 echo "Excluding $optimized_lib_name" >> $LOGFILE 528 cat $filelist | fgrep -vx "$optimized_lib_name" > $filelist.tmp528 fgrep -vx "$optimized_lib_name $filelist" > $filelist.tmp 529 529 echo "Replacing it with $vanilla_lib_name" >> $LOGFILE 530 530 echo "$vanilla_lib_name" >> $filelist.tmp 531 531 mv -f $filelist.tmp $filelist 532 532 done 533 cat $filelist | sort | $AWK '{ print $1; }' | uniq > $filelist.tmp533 sort $filelist | $AWK '{ print $1; }' | uniq > $filelist.tmp 534 534 mv -f $filelist.tmp $filelist 535 535 echo -e "$DONE" … … 584 584 fi 585 585 echo "keyfile=$keyfile" >> $LOGFILE 586 locale=` cat "$keyfile" |fgrep KEYTABLE| tr -d '"' |cut -d'=' -f2`587 [ ! "$locale" ] && locale=` cat "$keyfile" | grep '.map$'| sed 's/^.* //'` # Slackware586 locale=`fgrep KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2` 587 [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'` # Slackware 588 588 echo "locale=$locale" >> $LOGFILE 589 589 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | fgrep "${locale}." | grep -vx " *#.*"` … … 998 998 local res currline partition all_partitions ap_orig remaining i j 999 999 1000 cat $MY_FSTAB | grep -vx " *#.*"| grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d||LABEL\=\// && !/fdd|cdr|zip|floppy/ {print $1}'1000 grep -vx " *#.*" $MY_FSTAB | grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d||LABEL\=\// && !/fdd|cdr|zip|floppy/ {print $1}' 1001 1001 # for partition in `$FDISK -l | tr -s ' ' '\n' | grep /dev` ; do 1002 1002 # [ -e "$i" ] && all_partitions=echo "$i" … … 1425 1425 echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE 1426 1426 elif [ "$partition_mountpt" = "" ] && [ -f "/etc/raidtab" ] ; then 1427 if [ "` cat /etc/raidtab 2> /dev/null | fgrep device| fgrep $current_partition`" ] ; then1427 if [ "`fgrep device /etc/raidtab 2>/dev/null | fgrep $current_partition`" ] ; then 1428 1428 partition_mountpt=raid 1429 1429 partition_format=raid … … 1471 1471 rmdir $1 1472 1472 echo -en " " > $1 1473 if [ "` cat /etc/issue.net 2> /dev/null | fgrep -i "debian"`" ] ; then1474 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `c at /etc/issue.net | cut -d ' ' -f 3` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ >> $1.tmp1475 else 1476 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"` cat /etc/issue.net | grep -i "linux" | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`cat /etc/issue.net | grep -i "kernel"| head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' '\\r' 'on' 'an' '\/' '`uname -r`' 'on' 'an' '`uname -m`/ >> $1.tmp1473 if [ "`fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then 1474 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | 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 1475 else 1476 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"`grep -i "linux" /etc/issue.net | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`grep -i "kernel" /etc/issue.net | head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' '\\r' 'on' 'an' '\/' '`uname -r`' 'on' 'an' '`uname -m`/ >> $1.tmp 1477 1477 fi 1478 1478 cat $1.tmp | sed s/%r/"`uname -r`"/ | sed s/%t/"`hostname`"/ > $1 … … 1640 1640 local disksize 1641 1641 disksize=$1 1642 if [ "` cat /etc/issue.net 2> /dev/null | fgrep -i "debian"`" ] ; then1643 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `c at /etc/issue.net | cut -d ' ' -f 3` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/1644 else 1645 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"` cat /etc/issue.net | grep -i "linux" | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`cat /etc/issue.net | grep -i "kernel"| head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' 'r' 'on' 'an' 'm/' '`uname -r`' 'on' 'an' '`uname -m`/1642 if [ "`fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then 1643 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | 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`"/ 1644 else 1645 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"`grep -i "linux" /etc/issue.net | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`grep -i "kernel" /etc/issue.net | head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' 'r' 'on' 'an' 'm/' '`uname -r`' 'on' 'an' '`uname -m`/ 1646 1646 fi 1647 1647 if [ "$disksize" -gt "2880" ] ; then … … 1944 1944 fi 1945 1945 if [ $? -ne "0" ] ; then 1946 if [ "` cat $LOGFILE | fgrep "/tmp/dev.0"`" ] ; then1946 if [ "`fgrep "/tmp/dev.0" $LOGFILE`" ] ; then 1947 1947 LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's.\n" 1948 1948 LogIt "Please reboot your PC as a workaround.\n" … … 2103 2103 tardir=$TMP_ROOT/tardir 2104 2104 2105 lines=` cat $MINDI_CONF/deplist.txt | grep -vx " *#.*" | grep -vx "" |wc -l`2105 lines=`grep -vx " *#.*" $MINDI_CONF/deplist.txt | grep -vx "" | wc -l` 2106 2106 cat $MINDI_CONF/deplist.txt | GenerateGiantDependencyList $needlist $lines 2107 2107 res=$? … … 2876 2876 lsmod | cut -d' ' -f1 >> $fname 2877 2877 lsmod | cut -d' ' -f1 >> $fname 2878 modules=` cat $fname | sort| uniq -d2 | tr '\n' ' '`2878 modules=`sort $fname | uniq -d2 | tr '\n' ' '` 2879 2879 rm -f $fname 2880 2880 [ "$modules" ] && echo "Unsaved kernel modules: $modules" >> $LOGFILE … … 2950 2950 FindLiloBinary 2951 2951 fi 2952 cat /proc/mounts | fgrep " $TMP_ROOT "| fgrep 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 reason2952 fgrep " $TMP_ROOT " /proc/mounts | fgrep 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 2953 2953 rm -f /tmp/mindi_lo 2954 2954 trap "Aborted" SIGTERM -
trunk/mindi/rootfs/sbin/find-and-mount-cdrom
r30 r274 7 7 for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do 8 8 [ ! "$SECOND_TRY" ] && LogIt "Trying $device" 9 if [ "` cat /tmp/mondo-restore.cfg | grep "using-cdstream yes"`" ]; then9 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg`" ]; then 10 10 pwd=`pwd` 11 11 cd $GROOVY … … 77 77 #mount /dev/fd0u1722 -t ext2 /mnt/floppy 78 78 [ "$1" = "--second-try" ] && exit 1; # don't try to mount floppy drive 79 if [ "` cat /tmp/mondo-restore.cfg | grep "using-cdstream yes"`" ] ; then79 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg`" ] ; then 80 80 LogIt "Because you are using cdstream, I won't try to mount CD." 81 81 exit 0 -
trunk/mindi/rootfs/sbin/post-init
r236 r274 59 59 cat /tmp/mountlist.txt >> /tmp/mondo-restore.log 60 60 61 iso=` cat /proc/cmdline | grep "iso"`62 nuke=` cat /proc/cmdline | grep "nuke"`61 iso=`grep iso /proc/cmdline` 62 nuke=`grep nuke /proc/cmdline` 63 63 if [ "$nuke" = "" ] ; then 64 nuke=` cat /proc/cmdline | grep -i "RESTORE "`64 nuke=`grep -i "RESTORE " /proc/cmdline` 65 65 fi 66 expert=` cat /proc/cmdline | grep "expert"`67 compare=` cat /proc/cmdline | grep "compare"`68 interactive=` cat /proc/cmdline | grep "interactive"`66 expert=`grep expert /proc/cmdline` 67 compare=`grep compare /proc/cmdline` 68 interactive=`grep interactive /proc/cmdline` 69 69 [ "$interactive" ] && expert=""; # in case 'expert' crops up somewhere 70 70 if which mondorestore > /dev/null 2> /dev/null ; then … … 112 112 mondorestore --nuke 113 113 elif [ "$expert" ] ; then 114 if [ "` cat /tmp/mondo-restore.cfg | grep tapedev`" ] ; then114 if [ "`grep tapedev /tmp/mondo-restore.cfg`" ] ; then 115 115 LogIt "-------------------TAPE MODE-------------------" 1 116 116 loc=`which mondorestore 2> /dev/null` … … 125 125 fi 126 126 fi 127 elif [ "` cat /tmp/mondo-restore.cfg | grep using-cdstream`" ] ; then127 elif [ "`grep using-cdstream /tmp/mondo-restore.cfg`" ] ; then 128 128 LogIt "------------------CDSTREAM MODE------------------" 1 129 129 loc=`which mondorestore 2> /dev/null`
Note:
See TracChangeset
for help on using the changeset viewer.