diff options
author | Roy Marples <roy@marples.name> | 2008-07-09 15:12:56 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-07-09 15:12:56 +0000 |
commit | c2781c209ec01a863b11f50a0df2d09c6702cbc9 (patch) | |
tree | 53605abfa2745f6ab9264067f7a3b0f86f629fe0 | |
parent | 5983add0f21fdacded88836aae8b8e392599060c (diff) |
Really test if we can write to RC_LIBDIR or not.
-rw-r--r-- | init.d/halt.sh.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/init.d/halt.sh.in b/init.d/halt.sh.in index 74ac02b7..47f86618 100644 --- a/init.d/halt.sh.in +++ b/init.d/halt.sh.in @@ -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 |