diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-06 12:54:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-06 12:54:09 +0000 |
commit | b9ee041e8f630ae2cdd0ff644d0f92c2304b9078 (patch) | |
tree | 1f2ef0101e279fb8363c3f303319eff610f90572 | |
parent | 17c8c0e3af7932edb6bd4fa0fa6e32b8205d6928 (diff) | |
download | alpine-conf-b9ee041e8f630ae2cdd0ff644d0f92c2304b9078.zip |
improve tempdir creation
-rwxr-xr-x | libalpine.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libalpine.sh.in b/libalpine.sh.in index add5798..ad741c0 100755 --- a/libalpine.sh.in +++ b/libalpine.sh.in @@ -38,9 +38,9 @@ eecho() { init_tmpdir() { local omask=`umask` - local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`" + local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`-$RANDOM" umask 077 || die "umask" - mkdir "$__tmpd" || exit 1 + mkdir -p "$__tmpd" || exit 1 trap "rm -fr \"$__tmpd\"; exit" 0 umask $omask eval "$1=\"$__tmpd\"" |