aboutsummaryrefslogtreecommitdiff
path: root/init.d/bootmisc.in
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-10-01 21:12:54 +0000
committerRoy Marples <roy@marples.name>2008-10-01 21:12:54 +0000
commit5f76c1121a7e93b11da5dbe9dfc8a643a39035c3 (patch)
treecdbd21e3b4cc4dcdc1d698d1dc0a825c8b96c7a5 /init.d/bootmisc.in
parent41c1e170d6cfb63980111e70931ab61f1a6af76b (diff)
Clean stale sockets.
Diffstat (limited to 'init.d/bootmisc.in')
-rw-r--r--init.d/bootmisc.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index e40fd516..50e83a0c 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -88,7 +88,11 @@ start()
for x in $(find /var/run ! -type d ! -name utmp \
! -name random-seed ! -name dev.db \
! -name ld-elf.so.hints ! -name ld.so.hints);
- do
+ do
+ # Clean stale sockets
+ if [ -S "${x}" ] && type fuser >/dev/null 2>&1; then
+ fuser -s "${x}" || rm "${x}"
+ fi
[ ! -f "${x}" ] && continue
# Do not remove pidfiles of already running daemons
case "${x}" in