Changeset 2781 in MondoRescue


Ignore:
Timestamp:
Apr 29, 2011, 3:36:20 PM (13 years ago)
Author:
Bruno Cornec
Message:

r2151@localhost (orig r2150): bruno | 2009-02-16 18:32:32 +0100

  • Fix a nasty bug where if /tmp was full, mktemp is returning empty, and thus we were doing all type of bad things :-( mktemp return is now checked before usage (as it should !) Thnaks should go to Jean-Marc Andre (jean-marc.andre_at_hp.com) who suffered from the bug (unusable machine after backup :-() and who was willing to find what happened and finally produced the log files which permitted that analysis.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.8/mindi/mindi

    r2777 r2781  
    9393
    9494# Now we can create what we need
    95 export MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX`
     95MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX`
     96if [ $? -ne 0 ]; then
     97    df $TMPDIR
     98    Die "Unable to create a temporary directory ! Check space on $TMPDIR"
     99fi
     100export MINDI_TMP
    96101
    97102# ----------------------------------------------------------------------------
     
    233238    # Clean temporary files only when standalone mindi
    234239    if [ _"$MINDI_TMP" != _"$MONDO_TMP" ]; then
    235         rm -Rf $MINDI_TMP
     240        # If no space on /tmp we may have an empty var
     241        if [ _"$MINDI_TMP" != _"" ]; then
     242            # Paranoid mode
     243            if [ _"$MINDI_TMP" != _"/" ]; then
     244                rm -Rf $MINDI_TMP
     245            fi
     246        fi
    236247    fi
    237248    exit $1
Note: See TracChangeset for help on using the changeset viewer.