fix early-docker issue by selecting newest docker daemon process

Signed-off-by: Dhawal Patel <dhawal.patel@nordstrom.com>
This commit is contained in:
Dhawal Patel 2016-06-29 12:10:05 -07:00
parent 4522adb3b2
commit a8cc89ce70

View file

@ -41,7 +41,7 @@ contains() {
get_command_line_args() { get_command_line_args() {
PROC="$1" PROC="$1"
for PID in $(pgrep -x -o "$PROC") for PID in $(pgrep -f -n "$PROC")
do do
tr "\0" " " < /proc/"$PID"/cmdline tr "\0" " " < /proc/"$PID"/cmdline
done done
@ -55,7 +55,7 @@ get_command_line_args() {
get_docker_cumulative_command_line_args() { get_docker_cumulative_command_line_args() {
OPTION="$1" OPTION="$1"
get_command_line_args docker | get_command_line_args "docker daemon" |
# normalize known long options to their short versions # normalize known long options to their short versions
sed \ sed \
-e 's/\-\-debug/-D/g' \ -e 's/\-\-debug/-D/g' \