Skip to content

Add a warning if "--config" is specified and we're going to attempt initdb #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions 3.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ if [ "$originalArgOne" = 'mongod' ]; then
done

if [ -z "$definitelyAlreadyInitialized" ]; then
if _mongod_hack_have_arg --config "$@"; then
echo >&2
echo >&2 'warning: database is not yet initialized, and "--config" is specified'
echo >&2 ' the initdb database startup might fail as a result!'
echo >&2
fi

pidfile="$(mktemp)"
trap "rm -f '$pidfile'" EXIT
_mongod_hack_ensure_arg_val --bind_ip 127.0.0.1 "$@"
Expand Down
7 changes: 7 additions & 0 deletions 3.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ if [ "$originalArgOne" = 'mongod' ]; then
done

if [ -z "$definitelyAlreadyInitialized" ]; then
if _mongod_hack_have_arg --config "$@"; then
echo >&2
echo >&2 'warning: database is not yet initialized, and "--config" is specified'
echo >&2 ' the initdb database startup might fail as a result!'
echo >&2
fi

pidfile="$(mktemp)"
trap "rm -f '$pidfile'" EXIT
_mongod_hack_ensure_arg_val --bind_ip 127.0.0.1 "$@"
Expand Down
7 changes: 7 additions & 0 deletions 3.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ if [ "$originalArgOne" = 'mongod' ]; then
done

if [ -z "$definitelyAlreadyInitialized" ]; then
if _mongod_hack_have_arg --config "$@"; then
echo >&2
echo >&2 'warning: database is not yet initialized, and "--config" is specified'
echo >&2 ' the initdb database startup might fail as a result!'
echo >&2
fi

pidfile="$(mktemp)"
trap "rm -f '$pidfile'" EXIT
_mongod_hack_ensure_arg_val --bind_ip 127.0.0.1 "$@"
Expand Down
7 changes: 7 additions & 0 deletions 3.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ if [ "$originalArgOne" = 'mongod' ]; then
done

if [ -z "$definitelyAlreadyInitialized" ]; then
if _mongod_hack_have_arg --config "$@"; then
echo >&2
echo >&2 'warning: database is not yet initialized, and "--config" is specified'
echo >&2 ' the initdb database startup might fail as a result!'
echo >&2
fi

pidfile="$(mktemp)"
trap "rm -f '$pidfile'" EXIT
_mongod_hack_ensure_arg_val --bind_ip 127.0.0.1 "$@"
Expand Down