Skip to content

Commit 9f77ea5

Browse files
ltangvaldyosifkit
authored andcommitted
entrypoint: Make value checks more consistent
To compare actual values, some checks used ! variable = value while others used variable != value. Changed all to the latter.
1 parent 33ba3e5 commit 9f77ea5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.template.Debian/docker-entrypoint.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ docker_get_config() {
9494
docker_start_server() {
9595
result=0
9696
%%SERVERSTARTUP%%
97-
if [ ! "$result" = "0" ];then
97+
if [ "$result" != "0" ];then
9898
docker_error "Unable to start server. Status code $result."
9999
fi
100100
}
@@ -119,7 +119,7 @@ docker_wait_for_server() {
119119
docker_stop_server() {
120120
result=0
121121
mysqladmin --defaults-extra-file="${PASSFILE}" shutdown -uroot --socket="${SOCKET}" || result=$?
122-
if [ ! "$result" = "0" ]; then
122+
if [ "$result" != "0" ]; then
123123
docker_error "Unable to shut down server. Status code $result."
124124
fi
125125
}
@@ -324,6 +324,6 @@ docker_main() {
324324
}
325325
# This checks if the script has been sourced from elsewhere.
326326
# If so we don't perform any further actions
327-
if [ ! "${FUNCNAME[${#FUNCNAME[@]} - 1]}" = 'source' ]; then
327+
if [ "${FUNCNAME[${#FUNCNAME[@]} - 1]}" != 'source' ]; then
328328
docker_main "$@"
329329
fi

0 commit comments

Comments
 (0)