From dfd3d91d99458e5d864e05958e957805306ed206 Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Mon, 6 May 2024 21:58:40 +0200 Subject: [PATCH] Fix quoting command result inside test (#141) Co-authored-by: DOMjudge team --- .../mysql_replication/templates/setup-replication.sh.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provision-contest/ansible/roles/mysql_replication/templates/setup-replication.sh.j2 b/provision-contest/ansible/roles/mysql_replication/templates/setup-replication.sh.j2 index d791d3f0..6bf515d1 100755 --- a/provision-contest/ansible/roles/mysql_replication/templates/setup-replication.sh.j2 +++ b/provision-contest/ansible/roles/mysql_replication/templates/setup-replication.sh.j2 @@ -126,9 +126,9 @@ get_field() check_status() { local sql_info="$(printf '%s\n' "$@")" - [ $(get_field 'Seconds_Behind_Master' "$sql_info") = '0' ] || return 1 - [ $(get_field 'Slave_SQL_Running' "$sql_info") = 'Yes' ] || return 1 - [ $(get_field 'Last_SQL_Errno' "$sql_info") = '0' ] || return 1 + [ "$(get_field 'Seconds_Behind_Master' "$sql_info")" = '0' ] || return 1 + [ "$(get_field 'Slave_SQL_Running' "$sql_info")" = 'Yes' ] || return 1 + [ "$(get_field 'Last_SQL_Errno' "$sql_info")" = '0' ] || return 1 return 0 }