Changeset 965 in MondoRescue for branches/stable/mindi/mindi


Ignore:
Timestamp:
Nov 23, 2006, 5:22:18 PM (17 years ago)
Author:
Bruno Cornec
Message:

mindi log file should now look nicer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r964 r965  
    10491049        /usr/bin/logger -s $1
    10501050    fi
    1051     echo -en "$1" >> $LOGFILE
     1051    echo -e "$1" >> $LOGFILE
    10521052}
    10531053
     
    11651165    echo "Your raw fstab file looks like this:-" >> $LOGFILE
    11661166    cat $MY_FSTAB >> $LOGFILE
    1167     echo "Your mountlist will look like this:-"
     1167    echo "Your mountlist will look like this:-" | tee -a $LOGFILE
    11681168
    11691169# scratchdir, mountlist(OUT)
     
    11961196    done
    11971197    [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`"
    1198     printf "        %-15s %-15s %-15s %-15s %-15s\n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)" LABEL
     1198    printf "        %-15s %-15s %-15s %-15s %-15s\n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)" LABEL | tee -a $LOGFILE
    11991199    useless_dev="/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 /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1"
    12001200    for c_p in $all_partitions ; do
     
    14051405            partition_mountpt="image"
    14061406            old_partition_fmt=$partition_format
    1407             echo "------- $FDISK -l log ------------" >> $LOGFILE
    14081407            partition_format="`$FDISK -l 2>> $LOGFILE | tr '*' ' ' | tr '+' ' ' | tr -s ' ' '\t' | grep -w "$absolute_partition" | cut -f5`"
    1409             echo "------- $FDISK log end ------------" >> $LOGFILE
    14101408            partition_size=$(($partition_size+1)); # just in case
    14111409            if [ "$partition_format" = "Linux" ] ; then
     
    14201418        fi
    14211419        if [ ! "$partition_mountpt" ] ; then
     1420            echo "------- $FDISK -l $qq log ------------" >> $LOGFILE
    14221421            for qq in "" `find /dev/ida/c*d* ! -name '*p*'` ; do
    1423                 echo "------- $FDISK -l $qq log ------------" >> $LOGFILE
    14241422                partition_format=`$FDISK -l $qq 2>> $LOGFILE | grep -w "$c_p" | sed 's/12/|/' | tr -s '\t' ' ' | cut -d'|' -f2 | cut -d' ' -f2-9`
    1425                 echo "------- $FDISK log end ------------" >> $LOGFILE
    14261423                [ "$partition_format" ] && break
    14271424            done
     1425            echo "------- $FDISK log end ------------" >> $LOGFILE
    14281426            if [ "$partition_format" = "Compaq diagnostics" ] ; then
    14291427                partition_format="compaq"
     
    14421440                partition_mountpt=raid
    14431441                partition_format=raid
    1444                 printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label"
     1442                printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" | tee -a $LOGFILE
    14451443                printf "%s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" >> $mountlist
    14461444            else
     
    14581456                partition_format="vfat"
    14591457            fi
    1460             printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label"
     1458            printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" | tee -a $LOGFILE
    14611459            printf "%s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" >> $mountlist
    14621460        fi
     
    29682966[ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty..."
    29692967
    2970 [ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it. Go to http://www.mondorescue.org and download it, then install it."
     2968[ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it.\nGo to http://www.mondorescue.org and download it, then install it."
    29712969
    29722970rm -f /root/images/mindi/{*img,*gz,*iso}
Note: See TracChangeset for help on using the changeset viewer.