summaryrefslogtreecommitdiffstats
path: root/bin/etc-update
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-26 04:39:03 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-26 04:39:03 +0000
commitb5f728a786d2fcb7f9960a96cfdf5fc26bcbb509 (patch)
tree54eb04aa3f90aca52e4d37464fba887191905fb0 /bin/etc-update
parentbc7943432207630818a58b6b1b95a537be01fd04 (diff)
downloadportage-b5f728a786d2fcb7f9960a96cfdf5fc26bcbb509.tar.gz
portage-b5f728a786d2fcb7f9960a96cfdf5fc26bcbb509.tar.bz2
portage-b5f728a786d2fcb7f9960a96cfdf5fc26bcbb509.zip
Initialize ${TMP} before registering the die trap so that
we're sure which directory die will clean up. (trunk r7802) svn path=/main/branches/2.1.2/; revision=7830
Diffstat (limited to 'bin/etc-update')
-rwxr-xr-xbin/etc-update2
1 files changed, 1 insertions, 1 deletions
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