From 215b155f2d53bf409cec14d37626f225b1b346bc Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 26 May 2023 15:07:13 +0200 Subject: [PATCH] Moved main parts to update_psa_impl. --- update_psa | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/update_psa b/update_psa index d94e477..e646c0b 100755 --- a/update_psa +++ b/update_psa @@ -70,43 +70,9 @@ done source ./update_psa_impl -if [ -z "$WORKING_DIRECTORY" ]; then - log_fatal "update_psa:${LINENO}: empty WORKING_DIRECTORY" -fi - -if ! cd "$WORKING_DIRECTORY"; then - log_fatal "update_psa:${LINENO}: cannot cd to $WORKING_DIRECTORY" -fi - -log_info "update_psa:${LINENO}: cd to $WORKING_DIRECTORY" - if read_config; then - check_default_route - check_route_to_repository "185.191.219.134" # git.mimbach.de - check_for_running_apism - if clone_customer_repository ${CUSTOMER_REPOSITORY_PATH}; then - check_sanity_of_repository - - if [ "$MAINTENANCE" = "NO" ]; then - log_info "update_psa:${LINENO}: MAINTENANCE OFF. Checking for updates..." - # someone must have activated the WAIT-button in ISMAS. - # Request the status of this button in updates_available(). - if ! updates_available; then - update_psa_false_alarm "update requested, but no WAIT state detected !!!" - log_fatal "update_psa:${LINENO}: update requested, but no WAIT state detected !!!" - fi - else - # simulate an activated WAIT-button - set_updates_available - while : - do - sleep 5 - updates_available && break - done - fi - # updates available - update_psa - fi + update_psa + exit 0 fi -exit 0 +exit 1 ###############################################################################