Use echo instead of touch - saves on forking

This commit is contained in:
Roy Marples
2007-07-13 00:04:20 +00:00
parent 639024a04a
commit cffbaa6c4e
5 changed files with 13 additions and 16 deletions

View File

@@ -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