From 497e34feafecf58c339721f3e37aeaceeaf18b84 Mon Sep 17 00:00:00 2001 From: slakmagik Date: Sat, 5 Feb 2011 03:19:19 +0000 Subject: [PATCH] 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. --- src/etc/sbopkg/sbopkg.conf.new | 2 +- src/usr/sbin/sbopkg | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/etc/sbopkg/sbopkg.conf.new b/src/etc/sbopkg/sbopkg.conf.new index 352e64b..091fde0 100644 --- a/src/etc/sbopkg/sbopkg.conf.new +++ b/src/etc/sbopkg/sbopkg.conf.new @@ -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} diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 80c579a..cc2bdc3 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -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