From 092884eda11013d332c1c0c6004eba3a9b845e01 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sun, 22 Jan 2006 12:36:07 +0000 Subject: [PATCH] - changed the way how temporary files/directories will be created: * 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 --- util-vserver/scripts/vserver-build.debootstrap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util-vserver/scripts/vserver-build.debootstrap b/util-vserver/scripts/vserver-build.debootstrap index af0cc93..56575d1 100644 --- a/util-vserver/scripts/vserver-build.debootstrap +++ b/util-vserver/scripts/vserver-build.debootstrap @@ -48,9 +48,11 @@ function initFilesystem 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 -- 1.8.1.5