summaryrefslogtreecommitdiff
path: root/init.d/halt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/halt.sh')
-rwxr-xr-xinit.d/halt.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.d/halt.sh b/init.d/halt.sh
index fb82db1..c3f76f3 100755
--- a/init.d/halt.sh
+++ b/init.d/halt.sh
@@ -58,7 +58,9 @@ if [ "${RC_SYS}" = "VPS" ]; then
fi
# If $svcdir is still mounted, preserve it if we can
-if mountinfo -q "${RC_SVCDIR}" && [ -w "${RC_LIBDIR}" ] ; then
+
+mnt=$(mountinfo --node "${RC_SVCDIR}")
+if [ -n "${mnt}" -a -w "${RC_LIBDIR}" ] ; then
f_opts="-m -c"
[ "${RC_UNAME}" = "Linux" ] && f_opts="-c"
if [ -n "$(fuser ${f_opts} "${svcdir}" 2>/dev/null)" ] ; then