* mktemp will now be called with the '-t' parameter and sometimes with
'-p'
* absolutes paths (e.g. '/tmp') were removed from the templates
* with this changes, it is now possible to override the location of
the temporary files by setting $TMPDIR. This should add a way to
solve problems like debootstrap on non-executable tmp-directories
(http://savannah.nongnu.org/bugs/?func=detailitem&item_id=15447)
These changes require that 'mktemp' understands the following switches:
* '-t' ... Generate a path rooted in a temporary directory.
* '-d' ... Make a directory instead of a file.
* '-p' ... Use the specified directory as a prefix when generating
the temporary filename.
Because 'mktemp' from Debian Woody's 'debianutils_1.16.2woody1'
supports these features every recent Linux distribution should do it
also.
- allow to override path of the debootstrap binary with the $DEBOOTSTRAP
environment variable
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2264
94cd875c-1c1d-0410-91d2-
eb244daf1a30
function findDebootstrap
{
+ test ! -x "$DEBOOTSTRAP" || return 0
+
pushd . &>/dev/null
DEBOOTSTRAP=$(which debootstrap 2>/dev/null) || {
- dir=$($_MKTEMPDIR /var/tmp/debootstrap.XXXXXX)
+ dir=$($_MKTEMPDIR -p /var/tmp debootstrap.XXXXXX)
workdir=$dir
dst=$dir/debootstrap.deb