From 8d47d6c0220720b8a0a4a9c46ceb612cef0e2e65 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 15 Oct 2008 08:35:21 +0000 Subject: Fix fuser on BSD platforms. --- init.d/bootmisc.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'init.d/bootmisc.in') diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 529097e..c3e714a 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -93,8 +93,12 @@ start() ! -name ld-elf.so.hints ! -name ld.so.hints); do # Clean stale sockets - if [ -S "${x}" ] && type fuser >/dev/null 2>&1; then - fuser -s "${x}" || rm "${x}" + if [ -S "${x}" ]; then + if type fuser >/dev/null 2>&1; then + fuser "${x}" 2>/dev/null || rm "${x}" + else + rm "${x}" + fi fi [ ! -f "${x}" ] && continue # Do not remove pidfiles of already running daemons -- cgit v1.2.3