polish: add trap cleanup_restore_rollback to match sibling restore scripts
Final whole-branch review noted alt_mysql_native_backup_restore.sh was the only one of three consumers of the shared rollback helpers without this trap, leaving a stale rollback temp file on signal/die().
This commit is contained in:
@@ -309,6 +309,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|||||||
[ -r "$COMMON_FILE" ] || die "missing helper: $COMMON_FILE"
|
[ -r "$COMMON_FILE" ] || die "missing helper: $COMMON_FILE"
|
||||||
# shellcheck source=../setup/mysql_common.sh
|
# shellcheck source=../setup/mysql_common.sh
|
||||||
source "$COMMON_FILE"
|
source "$COMMON_FILE"
|
||||||
|
trap cleanup_restore_rollback INT TERM EXIT
|
||||||
mysql_load_plugin_settings_file "$SETTINGS_FILE"
|
mysql_load_plugin_settings_file "$SETTINGS_FILE"
|
||||||
main "$@"
|
main "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user