summaryrefslogtreecommitdiff
path: root/init.d/halt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/halt.sh')
-rwxr-xr-xinit.d/halt.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/init.d/halt.sh b/init.d/halt.sh
index 2e4dabe..aa73a6d 100755
--- a/init.d/halt.sh
+++ b/init.d/halt.sh
@@ -58,14 +58,15 @@ if [ "${RC_SYS}" = "VPS" ]; then
fi
# If $svcdir is still mounted, preserve it if we can
-
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
- fuser -k ${f_opts} "${svcdir}" >/dev/null 2>&1
- sleep 2
+ if type fuser >/dev/null 2>&1; then
+ if [ -n "$(fuser ${f_opts} "${svcdir}" 2>/dev/null)" ]; then
+ fuser -k ${f_opts} "${svcdir}" >/dev/null 2>&1
+ sleep 2
+ fi
fi
cp -p "${RC_SVCDIR}"/deptree "${RC_SVCDIR}"/depconfig \
"${RC_SVCDIR}"/softlevel "${RC_SVCDIR}"/nettree \