Compare commits
No commits in common. "e941af6420a8e9228952ea430e7e587828f5c721" and "a88401943117d1f94cb5c24e075ba49990ad0f42" have entirely different histories.
e941af6420
...
a884019431
@ -362,7 +362,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
|
|||||||
\"RESULTCODE\" : ${p[2]},
|
\"RESULTCODE\" : ${p[2]},
|
||||||
\"STEP\" : \"update_psa_${p[3]}\",
|
\"STEP\" : \"update_psa_${p[3]}\",
|
||||||
\"STEP_RESULT\" : \"${p[4]}\",
|
\"STEP_RESULT\" : \"${p[4]}\",
|
||||||
\"VERSION\" : \"$VERSION\"
|
\"VERSION\" : \"${p[5]}\"
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
log_debug "$func:${LINENO}: data=$data"
|
log_debug "$func:${LINENO}: data=$data"
|
||||||
@ -378,8 +378,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
|
|||||||
local data="#M=APISM#C=CMD_SENDVERSION#J=
|
local data="#M=APISM#C=CMD_SENDVERSION#J=
|
||||||
{
|
{
|
||||||
\"VERSION_INFO\" : {
|
\"VERSION_INFO\" : {
|
||||||
\"CREATED\":\"$(date +%Y-%m-%dT%T)\",
|
\"CREATED\":\"$(date +%Y-%m-%dT%T)\"
|
||||||
\"HASH\":\"$(compute_hash)\"
|
|
||||||
},
|
},
|
||||||
\"TARIFF\": {
|
\"TARIFF\": {
|
||||||
$(<$TARIFF_CURRENT_FULL)
|
$(<$TARIFF_CURRENT_FULL)
|
||||||
@ -427,13 +426,13 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
|
|||||||
log_debug "$func:${LINENO}: data=$data EXITCODE=$EXITCODE"
|
log_debug "$func:${LINENO}: data=$data EXITCODE=$EXITCODE"
|
||||||
|
|
||||||
echo $((echo "$data"; sleep 1) | nc localhost $APISM_DB_PORT)
|
echo $((echo "$data"; sleep 1) | nc localhost $APISM_DB_PORT)
|
||||||
|
|
||||||
# if [ $EXITCODE -eq $RC_SUCCESS ]; then
|
# if [ $EXITCODE -eq $RC_SUCCESS ]; then
|
||||||
update_psa_update_succeeded $UPDATE_SUCCEEDED \
|
update_psa_update_succeeded $UPDATE_SUCCEEDED \
|
||||||
$RC_SUCCESS "psa update succeeded" $VERSION
|
$RC_SUCCESS "psa update succeeded"
|
||||||
|
|
||||||
update_psa_update_succeeded $UPDATE_ACTIVATED \
|
update_psa_update_succeeded $UPDATE_ACTIVATED \
|
||||||
$RC_SUCCESS "psa update activated" $VERSION
|
$RC_SUCCESS "psa update activated"
|
||||||
|
|
||||||
log_info "$func:${LINENO}: success"
|
log_info "$func:${LINENO}: success"
|
||||||
# fi
|
# fi
|
||||||
|
21
read_config
21
read_config
@ -6,10 +6,6 @@ source ./general_utils
|
|||||||
|
|
||||||
if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||||
readonly read_config_sourced=${BASH_SOURCE[0]}
|
readonly read_config_sourced=${BASH_SOURCE[0]}
|
||||||
|
|
||||||
readonly MAJOR="0"
|
|
||||||
readonly MINOR="1"
|
|
||||||
readonly PATCH="0"
|
|
||||||
|
|
||||||
readonly DATEFLAGS="+%Y.%m.%dT%H.%M.%S"
|
readonly DATEFLAGS="+%Y.%m.%dT%H.%M.%S"
|
||||||
readonly STRIPCOMMENTS='sed -e s/#.*$//g'
|
readonly STRIPCOMMENTS='sed -e s/#.*$//g'
|
||||||
@ -23,6 +19,8 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
|||||||
readonly UPDATEPSAEND=./.updatepsa/end
|
readonly UPDATEPSAEND=./.updatepsa/end
|
||||||
|
|
||||||
readonly PROGRAM=`basename $0`
|
readonly PROGRAM=`basename $0`
|
||||||
|
readonly VERSION="0.8.0"
|
||||||
|
|
||||||
readonly WORKSPACE_DIR=workspace
|
readonly WORKSPACE_DIR=workspace
|
||||||
|
|
||||||
WORKING_DIRECTORY=${WORKING_DIRECTORY:-$UPDATEPSAHOME}
|
WORKING_DIRECTORY=${WORKING_DIRECTORY:-$UPDATEPSAHOME}
|
||||||
@ -85,24 +83,12 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
|||||||
|
|
||||||
readonly ZONE_GROUPS=(${__zone_groups[@]})
|
readonly ZONE_GROUPS=(${__zone_groups[@]})
|
||||||
assert_a ZONE_GROUPS
|
assert_a ZONE_GROUPS
|
||||||
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
###############################################################################
|
###############################################################################
|
||||||
########################## parsing with jq finished ###########################
|
########################## parsing with jq finished ###########################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
compute_hash () {
|
|
||||||
# TODO: wie genau soll der hash-wert berechnet werden ?
|
|
||||||
HASH="12345abc"
|
|
||||||
# HASH_="67890def"
|
|
||||||
echo $HASH
|
|
||||||
}
|
|
||||||
|
|
||||||
compute_version () {
|
|
||||||
VERSION="$MAJOR.$MINOR.$PATCH+$CUSTOMER_LOCATION-$(compute_hash)"
|
|
||||||
}
|
|
||||||
|
|
||||||
check_sanity_of_repository () {
|
check_sanity_of_repository () {
|
||||||
local func="${FUNCNAME[0]}"
|
local func="${FUNCNAME[0]}"
|
||||||
|
|
||||||
@ -281,9 +267,6 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
|||||||
log_debug "$tab$tab ${KNOWN_FILES[$i]}"
|
log_debug "$tab$tab ${KNOWN_FILES[$i]}"
|
||||||
done
|
done
|
||||||
log_debug "sanity of ${CUSTOMER_REPOSITORY_PATH} OK"
|
log_debug "sanity of ${CUSTOMER_REPOSITORY_PATH} OK"
|
||||||
|
|
||||||
# compute version string for current (i.e. previous) version
|
|
||||||
compute_version
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ trap collect_current_configuration EXIT
|
|||||||
collect_current_configuration () {
|
collect_current_configuration () {
|
||||||
local func="${FUNCNAME[0]}"
|
local func="${FUNCNAME[0]}"
|
||||||
|
|
||||||
# TODO: eventuell muss die version neu berechnet werden
|
|
||||||
current_settings_to_ismas
|
current_settings_to_ismas
|
||||||
|
|
||||||
#for line in $(cat $UPDATE_CONF |\
|
#for line in $(cat $UPDATE_CONF |\
|
||||||
@ -168,9 +167,6 @@ update_psa() {
|
|||||||
log_error "$func:${LINENO}: cleanup_previous_version failed"
|
log_error "$func:${LINENO}: cleanup_previous_version failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# compute version string for current (i.e. new) version
|
|
||||||
compute_version
|
|
||||||
|
|
||||||
update_psa_cleanup $UPDATE_ISMAS_PROGRESS \
|
update_psa_cleanup $UPDATE_ISMAS_PROGRESS \
|
||||||
$RC_SUCCESS "cleanup after psa update"
|
$RC_SUCCESS "cleanup after psa update"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user