Wait for pidfile to exist when starting with Redhat init script

Fixes #5359

Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
This commit is contained in:
Chris St. Pierre 2014-05-16 09:08:59 -04:00
parent c4fc591fbe
commit a598dba134
1 changed files with 5 additions and 0 deletions

View File

@ -49,6 +49,11 @@ start() {
$exec -d $other_args &>> $logfile &
pid=$!
touch $lockfile
# wait for the pidfile to exist. see
# https://github.com/dotcloud/docker/issues/5359
while [ ! -f $pidfile ]; do
sleep 1
done
success
echo
else