Changeset 2432


Ignore:
Timestamp:
Sep 28, 2009, 2:16:31 PM (9 years ago)
Author:
bruno
Message:

Warning emited in case of duplicate mountpoints or devices in fstab found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/mindi

    r2431 r2432  
    12941294        else
    12951295            if [ "$partition_format" = "dos" ] || [ "$partition_format" = "msdos" ] ; then
    1296                 echo "Stupid bastard..." >> $LOGFILE
     1296                    echo "vfat should be used instead of dos/msdos as a partition format" >> $LOGFILE
    12971297                partition_format="vfat"
    12981298            fi
     
    13031303}
    13041304
     1305CheckMountlist() {
     1306    local file=$1
     1307    # Coherency verification
     1308    ML0=`cat $file | wc -l`
     1309    ML1=`$AWK '{print $1}' $file | sort -u | wc -l`
     1310    ML2=`$AWK '{print $2}' $file | sort -u | wc -l`
     1311    if [ "$ML0" -ne "$ML1" ]; then
     1312        echo "--------------------------------------------" >> $LOGFILE
     1313        echo "WARNING: Duplicate device entry in mountlist" | tee -a $LOGFILE
     1314        echo "--------------------------------------------" >> $LOGFILE
     1315    fi
     1316    if [ "$ML0" -ne "$ML2" ]; then
     1317        echo "--------------------------------------------" >> $LOGFILE
     1318        echo "WARNING: Duplicate mountpoint entry in mountlist" | tee -a $LOGFILE
     1319        echo "------------------------------------------------" >> $LOGFILE
     1320    fi
     1321}
    13051322
    13061323MakeSureNumberIsInteger() {
     
    19271944    TOTAL_BIGDIR_SIZE=`du -sk $bigdir | cut -f1`
    19281945    MakeMountlist $MINDI_TMP/mountlist.txt
     1946    CheckMountlist $MINDI_TMP/mountlist.txt
    19291947    mkdir -p $bigdir/tmp
    19301948    cp -f $MINDI_TMP/mountlist.txt $bigdir/tmp/mountlist.txt 2>> $LOGFILE || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk"
     
    19431961    cat $bigdir/tmp/mountlist.txt >> $LOGFILE
    19441962    echo "-----------------------------------" >> $LOGFILE
     1963
    19451964    echo -en "$FILES_IN_FILELIST" > $bigdir/FILES-IN-FILELIST 2>> $LOGFILE
    19461965    echo -en "$LAST_FILELIST_NUMBER" > $bigdir/LAST-FILELIST-NUMBER 2>> $LOGFILE
     
    26802699        [ ! "$2" ] && Die "Please specify the output file"
    26812700        MakeMountlist $2
     2701        CheckMountlist $2
    26822702        # Avoids logfile content for mondo
    26832703        export MONDO_SHARE=""
     
    28142834    MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    28152835    MakeMountlist $MINDI_TMP/mountlist.txt
     2836    CheckMountlist $MINDI_TMP/mountlist.txt
    28162837    mkdir -p $MINDI_TMP/small-all/tmp
    28172838    cd $MINDI_TMP/small-all
Note: See TracChangeset for help on using the changeset viewer.