summaryrefslogtreecommitdiff
path: root/sh/init-common-post.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-07-13 00:04:20 +0000
committerRoy Marples <roy@marples.name>2007-07-13 00:04:20 +0000
commitcffbaa6c4e90835cf50be79ac304cccf27605b39 (patch)
tree6e80b33f3254274f987f47f3c57d7335a278f64d /sh/init-common-post.sh
parent639024a04a34dea5e32812ce7c1e9e6f0b5f7e5c (diff)
downloadopenrc-cffbaa6c4e90835cf50be79ac304cccf27605b39.tar.gz
openrc-cffbaa6c4e90835cf50be79ac304cccf27605b39.tar.bz2
openrc-cffbaa6c4e90835cf50be79ac304cccf27605b39.tar.xz
Use echo instead of touch - saves on forking
Diffstat (limited to 'sh/init-common-post.sh')
-rw-r--r--sh/init-common-post.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/sh/init-common-post.sh b/sh/init-common-post.sh
index ec535eb..a89b12f 100644
--- a/sh/init-common-post.sh
+++ b/sh/init-common-post.sh
@@ -4,8 +4,8 @@
# mount $svcdir as something we can write to if it's not rw
# On vservers, / is always rw at this point, so we need to clean out
# the old service state data
-if touch "${RC_SVCDIR}/.test" 2>/dev/null ; then
- rm -rf "${RC_SVCDIR}/.test" \
+if echo 2>/dev/null >"${RC_SVCDIR}/.test.$$" ; then
+ rm -rf "${RC_SVCDIR}/.test.$$" \
$(ls -d1 "${RC_SVCDIR:-/lib/rcscripts/init.d}"/* 2>/dev/null | \
grep -Ev "/(deptree|ksoftlevel)$")
else