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)
Upstream-commit: a598dba1346c9f2e878e8250a9d641a2206cb4e5
Component: engine
This commit is contained in:
Chris St. Pierre
2014-05-16 09:08:59 -04:00
parent de83ad1721
commit cdfc80841a

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