diff options
author | Roy Marples <roy@marples.name> | 2008-10-15 08:35:21 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-10-15 08:35:21 +0000 |
commit | 8d47d6c0220720b8a0a4a9c46ceb612cef0e2e65 (patch) | |
tree | 953fd87c30f5431216532e1269e158e8d54d24be /init.d/bootmisc.in | |
parent | c18c74e816501b5eb41fc0e8ac92d4801454b861 (diff) |
Fix fuser on BSD platforms.
Diffstat (limited to 'init.d/bootmisc.in')
-rw-r--r-- | init.d/bootmisc.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 529097ef..c3e714a9 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 |