Changeset 2150


Ignore:
Timestamp:
Feb 16, 2009, 6:32:32 PM (10 years ago)
Author:
bruno
Message:
  • 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.9/mindi/mindi

    r2145 r2150  
    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.