UpdateController/update_psa_helpers

71 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-06-02 17:22:27 +02:00
#!/bin/bash
# if [ ${git_helpers_sourced:-1} = "1" ]; then
# readonly git_helpers_sourced=${BASH_SOURCE[0]}
#else
# return 0
#fi
# Fetch/merge updates from predefined repository using git.
#
fetch_customer_updates() {
local func="${FUNCNAME[0]}"
if ! pull_customer_repository customer_281; then
return 1
fi
return 0
}
# Check if the fetched/merged files have the correct md5 and are
# valid for the PSA.
#
check_new_customer_files() {
local func="${FUNCNAME[0]}"
return 0
}
# In case the new checked-out files are not correct, revert the git
# repository to its previous state.
#
revert_customer_repository() {
local func="${FUNCNAME[0]}"
return 0
}
# Backup before the update-process.
#
backup_previous_version() {
local func="${FUNCNAME[0]}"
return 0
}
# Try to install new opkg-packages (in case the are some
# in the new git-checkout).
#
do_update_dry_run() {
local func="${FUNCNAME[0]}"
return 0
}
# Install the new packages using opkg.
#
do_update() {
local func="${FUNCNAME[0]}"
return 0
}
# In case there was some error, re-install the previous package(s)
# and use the backup to restore any conf/ini-files.
#
fallback_to_previous_version() {
local func="${FUNCNAME[0]}"
return 0;
}
# If all went well, then execute all necessary cleanup steps.
#
cleanup_previous_version() {
local func="${FUNCNAME[0]}"
return 0
}