1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

ctdb-tests: Initialise return code file

The output file is initialised, so doesn't need to be created on
success.  Treat the return code file the same way.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2024-07-05 11:47:56 +10:00 committed by Martin Schwenke
parent 833deb067d
commit 4754001200

View File

@ -298,6 +298,7 @@ rpc_set_service_failure_response()
_out="${CTDB_TEST_TMP_DIR}/rpc_failure_output"
: >"$_out"
_rc_file="${CTDB_TEST_TMP_DIR}/rpc_result"
echo 0 >"$_rc_file"
(
# Subshell to restrict scope variables...
@ -333,7 +334,6 @@ rpc_set_service_failure_response()
if [ "$_numfails" -eq -1 ]; then
_unhealthy=false
echo 0 >"$_rc_file"
rpc_failure \
"WARNING: statistics changed but" \
"$_rpc_service" \
@ -350,7 +350,6 @@ rpc_set_service_failure_response()
>"$_out"
else
_unhealthy=false
echo 0 >"$_rc_file"
fi
if [ $restart_every -gt 0 ] &&