Use mkdir to test.
This commit is contained in:
parent
ccfbb4ad45
commit
cb2959ef76
@ -4,9 +4,9 @@
|
|||||||
# mount $svcdir as something we can write to if it's not rw
|
# 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
|
# On vservers, / is always rw at this point, so we need to clean out
|
||||||
# the old service state data
|
# the old service state data
|
||||||
if echo 2>/dev/null >"${RC_SVCDIR}/.test.$$" ; then
|
if mkdir "${RC_SVCDIR}/.test.$$" 2>/dev/null ; then
|
||||||
rm -rf "${RC_SVCDIR}/.test.$$" \
|
rmdir "${RC_SVCDIR}/.test.$$"
|
||||||
$(ls -d1 "${RC_SVCDIR:-/lib/rcscripts/init.d}"/* 2>/dev/null | \
|
rm -rf $(ls -d1 "${RC_SVCDIR:-/lib/rcscripts/init.d}"/* 2>/dev/null | \
|
||||||
grep -Ev "/(deptree|ksoftlevel)$")
|
grep -Ev "/(deptree|ksoftlevel)$")
|
||||||
else
|
else
|
||||||
mount_svcdir
|
mount_svcdir
|
||||||
|
Loading…
Reference in New Issue
Block a user