summaryrefslogtreecommitdiff
path: root/sh/init-common-post.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-24 15:28:48 +0000
committerRoy Marples <roy@marples.name>2007-09-24 15:28:48 +0000
commitcb2959ef76ec8bae2fb1eb2511ac8581f2ca448d (patch)
treedc61e4e3f44801ddacd553b4f2eae0e869603511 /sh/init-common-post.sh
parentccfbb4ad457a16357221ac7f7594717bbf3d05ee (diff)
downloadopenrc-cb2959ef76ec8bae2fb1eb2511ac8581f2ca448d.tar.gz
openrc-cb2959ef76ec8bae2fb1eb2511ac8581f2ca448d.tar.bz2
openrc-cb2959ef76ec8bae2fb1eb2511ac8581f2ca448d.tar.xz
Use mkdir to test.
Diffstat (limited to 'sh/init-common-post.sh')
-rw-r--r--sh/init-common-post.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/sh/init-common-post.sh b/sh/init-common-post.sh
index a89b12f..095d6a0 100644
--- a/sh/init-common-post.sh
+++ b/sh/init-common-post.sh
@@ -4,9 +4,9 @@
# 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 echo 2>/dev/null >"${RC_SVCDIR}/.test.$$" ; then
- rm -rf "${RC_SVCDIR}/.test.$$" \
- $(ls -d1 "${RC_SVCDIR:-/lib/rcscripts/init.d}"/* 2>/dev/null | \
+if mkdir "${RC_SVCDIR}/.test.$$" 2>/dev/null ; then
+ rmdir "${RC_SVCDIR}/.test.$$"
+ rm -rf $(ls -d1 "${RC_SVCDIR:-/lib/rcscripts/init.d}"/* 2>/dev/null | \
grep -Ev "/(deptree|ksoftlevel)$")
else
mount_svcdir