All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: maximilian attems <max-U9r9yeDMy7A@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] dracut: use TMPDIR defintion
Date: Mon, 16 May 2011 18:08:32 +0200	[thread overview]
Message-ID: <4DD14C00.6070708@redhat.com> (raw)
In-Reply-To: <1305560806-27836-1-git-send-email-max-U9r9yeDMy7A@public.gmane.org>

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

      parent reply	other threads:[~2011-05-16 16:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD14C00.6070708@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=max-U9r9yeDMy7A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.