From: Zac Medico Date: Mon, 24 Sep 2007 21:20:34 +0000 (-0000) Subject: Initialize ${TMP} before registering the die trap so that X-Git-Tag: v2.2_pre1~784 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e3da72ad6ef75d2a0bc4ea2c3b9c3a5b901e239a;p=portage.git Initialize ${TMP} before registering the die trap so that we're sure which directory die will clean up. svn path=/main/trunk/; revision=7802 --- diff --git a/bin/etc-update b/bin/etc-update index 268185676..3ca5a52b1 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -456,6 +456,7 @@ function die() { # scriptname=$(basename $0) +TMP="${PORTAGE_TMPDIR}/etc-update-$$" trap die term type portageq > /dev/null || exit $? @@ -469,7 +470,6 @@ export PORTAGE_TMPDIR #echo $CONFIG_PROTECT_MASK #export PORTAGE_TMPDIR=$(/usr/lib/portage/bin/portageq envvar PORTAGE_TMPDIR) -TMP="${PORTAGE_TMPDIR}/etc-update-$$" rm -rf "${TMP}" 2> /dev/null mkdir "${TMP}" || die "failed to create temp dir" 1 # make sure we have a secure directory to work in