Skip to contentSkip to conversation

audit: sleep to wait for stop finished

PATCH New [email protected] 1 participant 1 message Feb 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audit: sleep to wait for stop finished

From: Wenzong Fan <[email protected]>

This issue only occurs on Board Target that boot with local disk.

Steps to reproduce the issue:

$ for x in `seq 1 10`; do /etc/init.d/auditd restart; done
$ ps -e | grep auditd

There will be many auditd processes running.

If stop is not finished completely, then start will generate two auditd processes in the case.

---
 recipes-security/audit/audit/auditd | 4 ++++
 1 file changed, 4 insertions(+)
recipes-security/audit/audit/auditd +4 -0
index fcd96c9..bac9a77 100755
@@ -73,6 +73,10 @@ do_stop()
 		no|NO) ;;
 		*) /sbin/auditctl -D >/dev/null ;;
 	esac
+
+	# Waiting for start-stop-daemon finished
+	sleep 1
+
 	return "$RETVAL"
 }
 
Signature · 1 line
1.9.1