diff options
Diffstat (limited to 'init.d')
-rwxr-xr-x | init.d/halt.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/init.d/halt.sh b/init.d/halt.sh index 2e4dabee..aa73a6d0 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 \ |