projects
/
grml-x.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4af1d0
)
Exit if mktemp fails, use -u for HWINFO_TMP
v0.4.2
author
Michael Prokop
<mika@grml.org>
Thu, 12 Feb 2009 17:44:47 +0000
(18:44 +0100)
committer
Michael Prokop
<mika@grml.org>
Thu, 12 Feb 2009 17:44:47 +0000
(18:44 +0100)
grml-x
patch
|
blob
|
history
diff --git
a/grml-x
b/grml-x
index
85ec3f0
..
fdf8a9d
100755
(executable)
--- a/
grml-x
+++ b/
grml-x
@@
-39,9
+39,11
@@
[ -n "$XINITRC" ] || XINITRC="$HOME/.xinitrc"
# temporary files
[ -n "$XINITRC" ] || XINITRC="$HOME/.xinitrc"
# temporary files
- HWINFO_TMP="$(mktemp)"
- MONITORINFO="$(mktemp)"
- MOUSEINFO="$(mktemp)"
+ # notice: we need the unsafe option, otherwise users other than root
+ # can not write to HWINFO_TMP, but we don't want to run hwinfo as root
+ HWINFO_TMP="$(mktemp -u)" || exit 1
+ MONITORINFO="$(mktemp)" || exit 1
+ MOUSEINFO="$(mktemp)" || exit 1
if [ -z "$HWINFO_TMP" ] ; then
echo "Fatal: could not create temporary file. Exiting.">&2
if [ -z "$HWINFO_TMP" ] ; then
echo "Fatal: could not create temporary file. Exiting.">&2