summaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-29 16:23:59 +0000
committerRoy Marples <roy@marples.name>2007-11-29 16:23:59 +0000
commit16ad975b2de79f0fa9ae27940598658247bd3c5e (patch)
tree0bff815da65564bcd98c8af95693f7b877ed57e5 /init.d
parent82df7e4584282896a0618f14cca2dd3f3d23e8a2 (diff)
downloadopenrc-16ad975b2de79f0fa9ae27940598658247bd3c5e.tar.gz
openrc-16ad975b2de79f0fa9ae27940598658247bd3c5e.tar.bz2
openrc-16ad975b2de79f0fa9ae27940598658247bd3c5e.tar.xz
Allow services to define which extra commands require the service to be started
Diffstat (limited to 'init.d')
-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 \