From 16ad975b2de79f0fa9ae27940598658247bd3c5e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 29 Nov 2007 16:23:59 +0000 Subject: Allow services to define which extra commands require the service to be started --- init.d/halt.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'init.d/halt.sh') 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 \ -- cgit v1.2.3