grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Portable mktemp invocation?


From: Grégoire Sutre
Subject: Portable mktemp invocation?
Date: Thu, 23 Sep 2010 18:27:47 +0200
User-agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.9.1.11) Gecko/20100723 Lightning/1.0b2pre Shredder/3.0.6

Hi,

We use `mktemp' or `mktemp -d' (with no argument) in the shell scripts:

- grub-core/genmod.sh.in
- tests/util/grub-shell.in
- tests/util/grub-shell-tester.in
- tests/grub_script_blockarg.in
- tests/partmap_test.in
- util/powerpc/ieee1275/grub-mkrescue.in

But such invocations of mktemp fail on some systems (NetBSD, and,
according to their man pages, FreeBSD and MacOS X).

A simple solution would be to replace those invocations with:

mktemp [-d] ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX

What do you think?  Is there a better alternative?

Grégoire



reply via email to

[Prev in Thread] Current Thread [Next in Thread]