two tweaks noticed in testing

Exported TMPDIR from sbopkg.conf.

Worded the error message on mktemp failure to hopefully be more helpful
by suggesting a likely cause of failure.
This commit is contained in:
slakmagik 2011-02-05 03:19:19 +00:00
parent 0cd0d3ae7f
commit 497e34feaf
2 changed files with 8 additions and 3 deletions

View File

@ -23,7 +23,7 @@ SRCDIR=${SRCDIR:-/var/cache/sbopkg}
# /tmp is not a suitable containing directory, pass in an alternate
# TMPDIR or modify the following variable. This is actually a mktemp(1)
# variable.
TMPDIR=${TMPDIR:-/tmp}
export TMPDIR=${TMPDIR:-/tmp}
# Other variables:
CLEANUP=${CLEANUP:-NO}

View File

@ -4575,8 +4575,13 @@ fi
# Check for a good config file and set initial variables
config_check
SBOPKGTMP=$(mktemp -td sbopkg.XXXXXX) ||
{ echo "$SCRIPT: failed to create sbopkg's temporary directory"; exit 1; }
SBOPKGTMP=$(mktemp -td sbopkg.XXXXXX) || {
cat << EOF
$SCRIPT: failed to create sbopkg's temporary directory
Do you need to create the parent directories first?
EOF
exit 1
}
STARTQUEUE=$SBOPKGTMP/sbopkg-start-queue
USERQUEUE_LOCK=$SBOPKGTMP/sbopkg_user_queue.lck
MISSING_LIST_FILE=$SBOPKGTMP/sbopkg_addall_missing