Changeset 2995 for branches/3.0/mindi


Ignore:
Timestamp:
Apr 12, 2012, 3:38:39 PM (8 years ago)
Author:
bruno
Message:
  • Solve #610 by adding a --nolog option to mindi, which needs to be the first one, and used in analyze-my-lvm with a rdirection of errors to /dev/null.
  • Improve udev.conf file for Mageia by adding some required files
  • Improve logs generation in mindi by removing remaining oddities
Location:
branches/3.0/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/analyze-my-lvm

    r2977 r2995  
    5454    # Exclude LVs member of that env var
    5555    if [ "$MINDI_EXCLUDE_DEVS" ] ; then
    56         list_of_devices="`mindi --readalllink $LV_full_string`"
     56        list_of_devices="`mindi --nolog --readalllink $LV_full_string 2> /dev/null`"
    5757        l=""
    5858        for d in $list_of_devices; do
     
    152152        # If multipath check which type of devide are given, mpath prefered
    153153        for d in $list_of_devices; do
    154             l="$l `mindi --readalllink $d`"
     154            l="$l `mindi --nolog --readalllink $d 2> /dev/null`"
    155155            l="$l `GiveMapperOfdm $d`"
    156156        done
     
    184184        skip=0
    185185        l=""
    186         l="$l `mindi --readalllink $d`"
     186        l="$l `mindi --nolog --readalllink $d 2> /dev/null`"
    187187        l="$l `GiveMapperOfdm $d`"
    188188        list_of_devices="`echo $l | sort -u`"
     
    207207            for d in `cat $MINDI_TMP/pv.tmp2`; do
    208208                skip=0
    209                 l="$l `mindi --readalllink $d`"
     209                l="$l `mindi --nolog --readalllink $d 2> /dev/null`"
    210210                l="$l `GiveMapperOfdm $d`"
    211211                list_of_devices="`echo $l | sort -u`"
     
    294294                rm -f $MINDI_TMP/sorteddm
    295295        for d in `ListAllLogicalVolumes` ; do
    296             dm=`mindi --readalllink $d | tail -1`
     296            dm=`mindi --nolog --readalllink $d 2> /dev/null | tail -1`
    297297            echo "$dm|$d" >> $MINDI_TMP/sorteddm
    298298        done
  • branches/3.0/mindi/deplist.d/udev.conf

    r2964 r2995  
    2727/sbin/udev
    2828/sbin/create_static_dev_nodes
     29/sbin/consoletype
    2930
     31# On Mandriva/Mageia at least
     32/etc/makedev.d
     33/sbin/makedev
  • branches/3.0/mindi/mindi

    r2987 r2995  
    156156    if [ _"$MONDO_SHARE" != _"" ] ; then
    157157        echo "------------- mindi logfile included -------------------------" >> /var/log/mondoarchive.log
    158         cat $LOGFILE >> /var/log/mondoarchive.log
     158        if [ -f $LOGFILE ]; then
     159            cat $LOGFILE >> /var/log/mondoarchive.log
     160        else
     161            echo "No LOGFILE available in that mindi run"  >> /var/log/mondoarchive.log
     162        fi
    159163        echo "--------------------------------------------------------------">> /var/log/mondoarchive.log
    160164    fi
     
    230234    [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 2160, approx.)"
    231235    if [ -e "$bigdir/$mappath" ] ; then
    232         LogFile "$mappath already added" >> $LOGFILE
     236        LogFile "INFO: $mappath already added" >> $LOGFILE
    233237        return
    234238    elif [ -d "$bigdir/$mappath" ] ; then
     
    236240        return
    237241    fi
    238     LogFile "Added kbd map $mappath" >> $LOGFILE
     242    LogFile "INFO: Added kbd map $mappath" >> $LOGFILE
    239243    if [ ! -e "$mappath" ] ; then
    240244            mappath=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"`
     
    503507    fi
    504508    if [ ! -e "$1" ] ; then
    505         LogIt "WARNING - cannot search specific path '$1'"
     509        LogIt "WARNING: cannot search specific path '$1'"
    506510        return 1
    507511    fi
     
    885889    for fname in $incoming ; do
    886890        if [ ! -e "$fname" ] ; then
    887             LogFile "WARNING - $fname does not exist; cannot be LDD'd."
     891            LogFile "WARNING: $fname does not exist; cannot be LDD'd."
    888892            if echo $fname | grep lvm &> /dev/null ; then
    889893                LogFile "          This warning only affects you if you are using LVM."
     
    14141418    # Coherency verification
    14151419    ML01=`cat $file | wc -l`
    1416     ML02=`grep -v ' lvm ' $file | wc -l`
     1420    ML02=`grep -vE ' lvm | raid | swap ' $file | wc -l`
    14171421    ML1=`$AWK '{print $1}' $file | sort -u | wc -l`
    1418     ML2=`grep -v ' lvm ' $file | $AWK '{print $2}' | sort -u | wc -l`
     1422    ML2=`grep -v ' lvm | raid | swap ' $file | $AWK '{print $2}' | sort -u | wc -l`
    14191423    if [ "$ML01" -ne "$ML1" ]; then
    14201424        LogFile "--------------------------------------------"
     
    20482052        for i in $EXTRA_MODS ; do
    20492053            j=`find lib/modules/$FAILSAFE_KVER -name $i.*o.gz 2> /dev/null`
    2050             [ ! "$j" ] && LogFile "WARNING - cannot find failsafe module $i.o.gz"
     2054            [ ! "$j" ] && LogFile "WARNING: cannot find failsafe module $i.o.gz"
    20512055            for k in $j ; do
    20522056                tar cf - $k 2>> $MINDI_TMP/$$.log | (cd "$bigdir" ; tar xf -) || LogIt "ERROR: module $k extraction issue" $MINDI_TMP/$$.log
     
    26792683    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    26802684        LogFile "INFO: Deleting devfsd daemon from ramdisk"
    2681         [ ! -e "/sbin/devfsd" ] && LogFile "...because /sbin/devfsd not found"
    2682         [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && LogFile "...because kernel is failsafe"
     2685        [ ! -e "/sbin/devfsd" ] && LogFile "      ...because /sbin/devfsd not found"
     2686        [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && LogFile "      ...because kernel is failsafe"
    26832687        rm -f $mountpoint/sbin/devfsd
    26842688    fi
     
    27222726        rm -f ${rdz_fname}.tmp
    27232727        # log that we are done
    2724         LogFile "...done."
     2728        LogFile "      ...done."
    27252729    elif [ "$gvFileSystem" = "initramfs" ]; then
    27262730        # say what will be used
     
    27372741        umount $mountpoint || Die "Cannot unmount $tempfile"
    27382742        # log that we are done
    2739         LogFile "...done."
     2743        LogFile "      ...done."
    27402744    else
    27412745        Die "Filesystem $gvFileSystem not supported for initrd image. Terminating."
     
    27632767fi
    27642768
     2769# --nolog needs to be first, and is used in analyze-my-lvm
     2770if [ "$1" = "--nolog" ] ; then
     2771    shift
     2772    LOGFILE=/dev/stderr
     2773else
     2774    > $LOGFILE
     2775fi
    27652776if [ "$1" = "--printvar" ] ; then
    27662777    shift
     
    27712782fi
    27722783
    2773 > $LOGFILE
    27742784LogFile "mindi v$MINDI_VERSION"
    27752785LogFile "$ARCH architecture detected"
     
    27952805    LogFile "-----------------------------"
    27962806fi
    2797 
     2807LogFile "In Mindi"
     2808LogFile "--------"
     2809LogFile "EXTRA_SPACE = $EXTRA_SPACE"
     2810LogFile "BOOT_SIZE = $BOOT_SIZE"
     2811LogFile "--------"
    27982812
    27992813trap AbortHere SIGTERM SIGHUP SIGQUIT SIGKILL SIGABRT SIGINT
     
    28692883LogFile "-------------"
    28702884mount >> $LOGFILE
    2871 LogFile "-------------"
    28722885if [ -e /etc/raidtab ]; then
    28732886    LogFile "-------------"
     
    29282941df -T >> $LOGFILE
    29292942LogFile "-------------"
    2930 LogFile "Liste of extra modules is:"
     2943LogFile "List of extra modules is:"
    29312944LogFile "$EXTRA_MODS"
    29322945LogFile "-------------"
     
    31303143
    31313144for i in loop cdrom ide-cd isofs linear raid0 raid1 raid5 ; do
    3132     modprobe $i >> $LOGFILE 2>> $LOGFILE
     3145    modprobe $i 2>&1 > /dev/null
    31333146done
    31343147
     
    32313244        OfferToMakeBootableUSB
    32323245    fi
    3233     LogIt "Finished."
    32343246elif [ "$TAPEDEV" ] ; then
    32353247    if [ "$ARCH" != "ia64" ] ; then
     
    32543266fi
    32553267# cleanup
    3256 LogIt "$FRIENDLY_OUTSTRING"
     3268LogIt "INFO: $FRIENDLY_OUTSTRING"
    32573269for mtpt in $FLOPPY_WAS_MOUNTED ; do
    32583270    mount $mtpt
  • branches/3.0/mindi/mindi-bkphw

    r2940 r2995  
    115115} else {
    116116    print "INFO: No Hardware optimized support for your product $productname\n";
    117     print "You may ask your manufacturer to contribute to the mindi project\nfor firmware Disaster Recovery support (harmless)\n";
     117    print "      You may ask your manufacturer to contribute to the mindi project\n      for firmware Disaster Recovery support (harmless)\n";
    118118}
    119119rmdir $bkpdir if (-d $bkpdir) ;
Note: See TracChangeset for help on using the changeset viewer.