projects
/
platform
/
upstream
/
dracut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fbe8a0
)
99base/initqueue: make operations more atomic
author
Harald Hoyer
<harald@redhat.com>
Tue, 6 Oct 2009 16:09:40 +0000
(18:09 +0200)
committer
Harald Hoyer
<harald@redhat.com>
Tue, 6 Oct 2009 17:09:22 +0000
(19:09 +0200)
modules.d/99base/initqueue
patch
|
blob
|
history
diff --git
a/modules.d/99base/initqueue
b/modules.d/99base/initqueue
index
50c48de
..
e5246ee
100755
(executable)
--- a/
modules.d/99base/initqueue
+++ b/
modules.d/99base/initqueue
@@
-25,12
+25,17
@@
else
job=${job##*/}
fi
+
if [ -n "$onetime" ]; then
- echo '[ -e "$job" ] && rm "$job"' > "/tmp/${job}.sh"
- echo "$@" >> "/tmp/${job}.sh"
+ {
+ echo '[ -e "$job" ] && rm "$job"'
+ echo "$@"
+ } > "/tmp/$$-${job}.sh"
else
- echo "$@" > "/tmp/${job}.sh"
+ echo "$@" > "/tmp/$
$-$
{job}.sh"
fi
-mv -f "/tmp/$
{job}.sh" /initqueue${settled}/
+mv -f "/tmp/$
$-${job}.sh" "/initqueue${settled}/${job}.sh"
[ -z "$settled" ] && >> /initqueue/work
+;
+