summaryrefslogtreecommitdiff
path: root/src/sysv
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-11-17 08:29:19 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-11-18 08:34:55 -0500
commit001e8f2607e7c11516f51aff8cbce7a6e3445684 (patch)
treee77bce1d82c277269c9fffc8f1c0083a8f2ad4e0 /src/sysv
parentce74ab701f921d39501e8d82898f50c628ff8596 (diff)
downloadsssd-001e8f2607e7c11516f51aff8cbce7a6e3445684.tar.gz
sssd-001e8f2607e7c11516f51aff8cbce7a6e3445684.tar.bz2
sssd-001e8f2607e7c11516f51aff8cbce7a6e3445684.zip
Ensure that SSSD shuts down completely before restarting
Diffstat (limited to 'src/sysv')
-rw-r--r--src/sysv/sssd9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sysv/sssd b/src/sysv/sssd
index 47804371..7339d86d 100644
--- a/src/sysv/sssd
+++ b/src/sysv/sssd
@@ -48,8 +48,17 @@ start() {
stop() {
echo -n $"Stopping $prog: "
+ pid=`cat $PID_FILE`
+
killproc -p $PID_FILE $SSSD -TERM
RETVAL=$?
+
+ # Wait until the monitor exits
+ while (checkpid $pid)
+ do
+ usleep 100000
+ done
+
echo
[ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
return $RETVAL