criu/test/others/rpc/action-script.sh
Radostin Stoyanov 9d072222ef test/others/rpc: parse action-script via config
Extend the test for overwriting config options via RPC with
repeatable option (--action-script) and verify that the value
will not be silently duplicated.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2025-11-05 15:41:34 -08:00

17 lines
306 B
Bash
Executable file

#!/bin/bash
MARKER_FILE="_marker_${CRTOOLS_SCRIPT_ACTION}"
if [ -z "$CRTOOLS_SCRIPT_ACTION" ]; then
echo "Error: CRTOOLS_SCRIPT_ACTION is not set."
exit 2
fi
if [ ! -f "$MARKER_FILE" ]; then
touch "$MARKER_FILE"
else
echo "Error: Running the same action hook for the second time"
exit 1
fi
exit 0