Really test if we can write to RC_LIBDIR or not.

This commit is contained in:
Roy Marples 2008-07-09 15:12:56 +00:00
parent 5983add0f2
commit c2781c209e

View File

@ -38,7 +38,11 @@ fi
# If $svcdir is still mounted, preserve it if we can
mnt=$(mountinfo --node "${RC_SVCDIR}")
if [ -n "${mnt}" -a -w "${RC_LIBDIR}" ]; then
if [ -n "${mnt}" ] && \
rm -rf "${RC_LIBDIR}/tmp.$$" && \
mkdir -p "${RC_LIBDIR}/tmp.$$" \
; then
rmdir "${RC_LIBDIR}/tmp.$$"
f_opts="-m -c"
[ "${RC_UNAME}" = "Linux" ] && f_opts="-c"
if type fuser >/dev/null 2>&1; then