* [PATCH] dracut: use TMPDIR defintion
@ 2011-05-16 15:46 maximilian attems
[not found] ` <1305560806-27836-1-git-send-email-max-U9r9yeDMy7A@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: maximilian attems @ 2011-05-16 15:46 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, maximilian attems
mktemp has marked the "-t" as deprecated.
TMPDIR is anyway write guarded just a line above since dracut 003.
Signed-off-by: maximilian attems <max-U9r9yeDMy7A@public.gmane.org>
---
dracut | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut b/dracut
index d19c162..e018061 100755
--- a/dracut
+++ b/dracut
@@ -452,7 +452,7 @@ elif [[ -f "$outfile" && ! -w "$outfile" ]]; then
fi
[[ $TMPDIR && ! -w $TMPDIR ]] && unset TMPDIR
-readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX)
+readonly initdir=$(mktemp --tmpdir=${TMPDIR:-/var/tmp/} -d initramfs.XXXXXX)
# clean up after ourselves no matter how we die.
trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dracut: use TMPDIR defintion
[not found] ` <1305560806-27836-1-git-send-email-max-U9r9yeDMy7A@public.gmane.org>
@ 2011-05-16 16:08 ` Harald Hoyer
0 siblings, 0 replies; 2+ messages in thread
From: Harald Hoyer @ 2011-05-16 16:08 UTC (permalink / raw)
To: maximilian attems; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
Am 16.05.2011 17:46, schrieb maximilian attems:
> mktemp has marked the "-t" as deprecated.
> TMPDIR is anyway write guarded just a line above since dracut 003.
>
> Signed-off-by: maximilian attems <max-U9r9yeDMy7A@public.gmane.org>
> ---
> dracut | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/dracut b/dracut
> index d19c162..e018061 100755
> --- a/dracut
> +++ b/dracut
> @@ -452,7 +452,7 @@ elif [[ -f "$outfile" && ! -w "$outfile" ]]; then
> fi
>
> [[ $TMPDIR && ! -w $TMPDIR ]] && unset TMPDIR
We should even remove the above line, because we really want /var/tmp here.
/tmp might be to small and we want to prevent accidents (like as we do, when we
set $PATH)
> -readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX)
> +readonly initdir=$(mktemp --tmpdir=${TMPDIR:-/var/tmp/} -d initramfs.XXXXXX)
>
> # clean up after ourselves no matter how we die.
> trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-16 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16 15:46 [PATCH] dracut: use TMPDIR defintion maximilian attems
[not found] ` <1305560806-27836-1-git-send-email-max-U9r9yeDMy7A@public.gmane.org>
2011-05-16 16:08 ` Harald Hoyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox