diff options
Diffstat (limited to 'init.d/halt.sh.in')
-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 |