From cffbaa6c4e90835cf50be79ac304cccf27605b39 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 13 Jul 2007 00:04:20 +0000 Subject: Use echo instead of touch - saves on forking --- sh/init-common-post.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sh') diff --git a/sh/init-common-post.sh b/sh/init-common-post.sh index ec535eb6..a89b12fe 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 -- cgit v1.2.3