Compare commits

..

No commits in common. "6bf95ba1314922393bdb8334393c68c0712f4275" and "7e0eccc8d09ac79be98fbfa7436f9d71e2fa6f7f" have entirely different histories.

4 changed files with 143 additions and 228 deletions

View File

@ -375,9 +375,6 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
current_settings_to_ismas () {
local func="${FUNCNAME[0]}"
local p=("$@")
return 0
local data="#M=APISM#C=CMD_SENDVERSION#J=
{
\"VERSION_INFO\" : {
@ -385,7 +382,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
\"HASH\":\"$(compute_hash)\"
},
\"TARIFF\": {
$(<$TC_PSA_TC_FILE)
$(<$TARIFF_CURRENT_FULL)
},
\"HARDWARE\" : {
\"DEVICES\" : [
@ -402,8 +399,8 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
sed -E -e 's/.*:\s*(.*)/\1/g')\"
},
\"DC\" : {
\"VERSION\" : \"$(cat $PSA_UPDATE_CONF | jq -r .dc.version)\",
\"MD5SUM\" : \"$(cat $PSA_UPDATE_CONF | jq -r .dc.dc2c)\"
\"VERSION\" : \"$(cat $UPDATE_CONF | jq -r .dc.version)\",
\"MD5SUM\" : \"$(cat $UPDATE_CONF | jq -r .dc.dc2c)\"
},
\"PRINTER\" : {
},

View File

@ -25,7 +25,6 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
readonly PROGRAM=`basename $0`
readonly WORKSPACE_DIR=workspace
# TODO: entfernen indem man subtree benutzt
WORKING_DIRECTORY=${WORKING_DIRECTORY:-$UPDATEPSAHOME}
CONFIGFILENAME=${CONFIGFILENAME:-'update_psa.conf'}
@ -40,7 +39,6 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
EXITCODE=$RC_SUCCESS
CLONE_CUSTOMER_REPOSITORY=false
# read config file (JSON syntax)
read_config() {
local func="${FUNCNAME[0]}"
@ -87,6 +85,7 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
readonly ZONE_GROUPS=(${__zone_groups[@]})
assert_a ZONE_GROUPS
return 0
}
@ -106,13 +105,27 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
check_sanity_of_repository () {
local func="${FUNCNAME[0]}"
local __customer_id_base_dir="$WORKING_DIRECTORY/${WORKSPACE_DIR}"
readonly CUSTOMER_ID_BASE_DIR="${__customer_id_base_dir}/${CUSTOMER_ID}"
assert_d CUSTOMER_ID_BASE_DIR
CUSTOMER_LOCATION_DIR="${CUSTOMER_ID_BASE_DIR}/${CUSTOMER_LOCATION}"
assert_d CUSTOMER_LOCATION_DIR
readonly UPDATE_CONF="${CUSTOMER_LOCATION_DIR}/update.conf"
assert_f UPDATE_CONF
readonly DC="dc2c.hex"
readonly DC_SYS_DIR="/etc/dc"
readonly DC_SYS_DC_FULL="${DC_SYS_DIR}/$DC"
assert_d DC_SYS_DIR
assert_f DC_SYS_DC_FULL
readonly DC_DIR="${CUSTOMER_LOCATION_DIR}/dc"
readonly DC_FULL="${DC_DIR}/$DC"
assert_d DC_DIR
assert_f DC_FULL
# readonly zone_groups=(${__zone_groups[@]})
# by now (03.03.2023) there is only one zone group.
@ -130,220 +143,137 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
done
done
# for szeged:
# placeholder
# /home/root/szeged/UpdateController/workspace/customer_281/szeged/1/1
# /home/root/szeged/UpdateController/workspace/customer_281/szeged/1/2
# /home/root/szeged/UpdateController/workspace/customer_281/szeged/1/3
readonly CUST_BASE_DIRS=(${__customer_base_dirs[@]})
assert_a CUST_BASE_DIRS
readonly CUSTOMER_BASE_DIRS=(${__customer_base_dirs[@]})
assert_a CUSTOMER_BASE_DIRS
# TODO
# TODO: falls mehrere gruppen/zonen auftauchen hier anpassen
# TODO
# Zone aus /etc/zone_nr auslesen
#
readonly ZONE=1
readonly CUST_BASE_DIR="${CUST_BASE_DIRS[$ZONE]}"
assert_d CUST_BASE_DIR
readonly ETC_SYS_DIR="/etc"
readonly ATB_SYS_DIR="/etc/atb"
readonly DC_SYS_DIR="/etc/dc"
readonly TARIFF_SYS_DIR="/etc/tariff"
readonly OPKG_SYS_DIR="/etc/psa_update"
readonly CONF_SYS_DIR="/etc/psa_config"
readonly OPT_SYS_DIR="/opt"
readonly APP_SYS_DIR="/opt/app"
readonly SYSCONFIG_SYS_DIR="/opt/app/sysconfig"
readonly ATBAPP_SYS_DIR="/opt/app/ATBAPP"
readonly ISMASMGR_SYS_DIR="/opt/app/ISMASMgr"
readonly ETC_PSA_DIR=${CUST_BASE_DIR}${ETC_SYS_DIR}
readonly ATB_PSA_DIR=${CUST_BASE_DIR}${ATB_SYS_DIR}
readonly DC_PSA_DIR=${CUST_BASE_DIR}${DC_SYS_DIR}
readonly TARIFF_PSA_DIR=${CUST_BASE_DIR}${TARIFF_SYS_DIR}
readonly OPKG_PSA_DIR=${CUST_BASE_DIR}${OPKG_SYS_DIR}
readonly CONF_PSA_DIR=${CUST_BASE_DIR}${CONF_SYS_DIR}
readonly OPT_PSA_DIR=${CUST_BASE_DIR}${OPT_SYS_DIR}
readonly APP_PSA_DIR=${CUST_BASE_DIR}${APP_SYS_DIR}
readonly ATBAPP_PSA_DIR=${CUST_BASE_DIR}${ATBAPP_SYS_DIR}
readonly SYSCONFIG_PSA_DIR=${CUST_BASE_DIR}${SYSCONFIG_SYS_DIR}
readonly ISMASMGR_PSA_DIR=${CUST_BASE_DIR}${ISMASMGR_SYS_DIR}
readonly ATBQT_INI="ATBQT.ini"
readonly ISMASMGR_INI="ISMASMgr.ini"
readonly SYSCONF_INI="sysconfig.ini"
readonly SYSCTRL_INI="SystemControl.ini"
readonly TARIFF_CURRENT="tariff.current"
readonly DC="dc2c.hex"
readonly DC_SYS_DC_FILE="${DC_SYS_DIR}/$DC"
readonly ATBQT_ATB_SYS_INI_FILE="${ATB_SYS_DIR}/$ATBQT_INI"
readonly ATBQT_APP_SYS_INI_FILE="${ATBAPP_SYS_DIR}/$ATBQT_INI"
readonly ATBQT_ETC_SYS_INI_FILE="${ETC_SYS_DIR}/$ATBQT_INI"
readonly ISMASMGRATB_SYS_INI_FILE="${ATB_SYS_DIR}/$ISMASMGR_INI"
readonly ISMASMGRAPP_SYS_INI_FILE="${ISMASMGR_SYS_DIR}/$ISMASMGR_INI"
readonly ISMASMGRETC_SYS_INI_FILE="${ETC_SYS_DIR}/$ISMASMGR_INI"
readonly ISMASMGRSCF_SYS_INI_FILE="${SYSCONFIG_SYS_DIR}/$ISMASMGR_INI"
readonly SYSCONF_ETC_SYS_INI_FILE="${ETC_SYS_DIR}/$SYSCONF_INI"
readonly SYSCONF_ATB_SYS_INI_FILE="${ATB_SYS_DIR}/$SYSCONF_INI"
readonly SYSCONF_SCF_SYS_INI_FILE="${SYSCONFIG_SYS_DIR}/$SYSCONF_INI"
readonly SYSCTRL_ETC_SYS_INI_FILE="${ETC_SYS_DIR}/$SYSCTRL_INI"
readonly SYSCTRL_ATB_SYS_INI_FILE="${ATB_SYS_DIR}/$SYSCTRL_INI"
readonly SYSCTRL_SCF_SYS_INI_FILE="${SYSCONFIG_SYS_DIR}/$SYSCTRL_INI"
readonly ZONE_FILE="$ETC_SYS_DIR/zone_nr"
readonly CUST_ID_FILE="$ETC_SYS_DIR/cust_nr"
readonly TC_SYS_TC_FILE="${ATBAPP_SYS_DIR}/$TARIFF_CURRENT"
readonly OPKG_CMDS_SYS_FILE="${OPKG_SYS_DIR}/opkg_commands"
readonly DC2C_SYS_SERIAL_JSON="${CONF_SYS_DIR}/DC2C_serial.json"
readonly DC2C_SYS_CASH_JSON="${CONF_SYS_DIR}/DC2C_cash.json"
readonly DC2C_SYS_CONF_JSON="${CONF_SYS_DIR}/DC2C_conf.json"
readonly DC_PSA_DC_FILE="${DC_PSA_DIR}/$DC"
readonly CUSTOMER_BASE_DIR="${CUSTOMER_BASE_DIRS[$ZONE]}"
assert_d CUSTOMER_BASE_DIR
readonly ATBQT_ATB_PSA_INI_FILE="${ATB_SYS_DIR}/$ATBQT_INI"
readonly ATBQT_APP_PSA_INI_FILE="${ATBAPP_SYS_DIR}/$ATBQT_INI"
readonly ATBQT_ETC_PSA_INI_FILE="${ETC_SYS_DIR}/$ATBQT_INI"
readonly ISMASMGRATB_PSA_INI_FILE="${ATB_PSA_DIR}/$ISMASMGR_INI"
readonly ISMASMGRAPP_PSA_INI_FILE="${ISMASMGR_PSA_DIR}/$ISMASMGR_INI"
readonly ISMASMGRETC_PSA_INI_FILE="${ETC_PSA_DIR}/$ISMASMGR_INI"
readonly ISMASMGRSCF_PSA_INI_FILE="${SYSCONFIG_PSA_DIR}/$ISMASMGR_INI"
readonly SYSCONF_ETC_PSA_INI_FILE="${ETC_PSA_DIR}/$SYSCONF_INI"
readonly SYSCONF_ATB_PSA_INI_FILE="${ATB_PSA_DIR}/$SYSCONF_INI"
readonly SYSCONF_SCF_PSA_INI_FILE="${SYSCONFIG_PSA_DIR}/$SYSCONF_INI"
readonly SYSCTRL_ETC_PSA_INI_FILE="${ETC_SYS_DIR}/$SYSCTRL_INI"
readonly SYSCTRL_ATB_PSA_INI_FILE="${ATB_SYS_DIR}/$SYSCTRL_INI"
readonly SYSCTRL_SCF_PSA_INI_FILE="${SYSCONFIG_SYS_DIR}/$SYSCTRL_INI"
readonly OPKG_CMDS_PSA_FILE="${OPKG_PSA_DIR}/opkg_commands"
readonly TC_PSA_TC_FILE="${ATBAPP_PSA_DIR}/$TARIFF_CURRENT"
readonly PSA_UPDATE_CONF="${CUSTOMER_LOCATION_DIR}/update.conf"
readonly DC2C_PSA_SERIAL_JSON="${CONF_PSA_DIR}/DC2C_serial.json"
readonly DC2C_PSA_CASH_JSON="${CONF_PSA_DIR}/DC2C_cash.json"
readonly DC2C_PSA_CONF_JSON="${CONF_PSA_DIR}/DC2C_conf.json"
readonly PSA_CONFIG_DIR="${CUSTOMER_BASE_DIR}/etc/psa_config"
assert_d PSA_CONFIG_DIR
assert_d ETC_SYS_DIR
readonly PSA_UPDATE_DIR="${CUSTOMER_BASE_DIR}/etc/psa_update"
assert_d PSA_UPDATE_DIR
readonly ATB_SYS_DIR="/etc/atb"
assert_d ATB_SYS_DIR
assert_d DC_SYS_DIR
assert_d TARIFF_SYS_DIR
assert_d OPKG_SYS_DIR
assert_d CONF_SYS_DIR
assert_d OPT_SYS_DIR
assert_d APP_SYS_DIR
assert_d ATBAPP_SYS_DIR
assert_d SYSCONFIG_SYS_DIR
assert_d ISMASMGR_SYS_DIR
assert_d ETC_PSA_DIR
assert_d ATB_PSA_DIR
assert_d DC_PSA_DIR
assert_d TARIFF_PSA_DIR
assert_d OPKG_PSA_DIR
assert_d CONF_PSA_DIR
assert_d OPT_PSA_DIR
assert_d APP_PSA_DIR
assert_d ATBAPP_PSA_DIR
assert_d SYSCONFIG_PSA_DIR
assert_d ISMASMGR_PSA_DIR
assert_f DC_SYS_DC_FILE
assert_f ZONE_FILE
assert_f CUST_ID_FILE
assert_f ATBQT_ATB_SYS_INI_FILE
assert_f ATBQT_APP_SYS_INI_FILE
assert_f ATBQT_ETC_SYS_INI_FILE
assert_f ISMASMGRATB_SYS_INI_FILE
assert_f ISMASMGRAPP_SYS_INI_FILE
assert_f ISMASMGRETC_SYS_INI_FILE
assert_f ISMASMGRSCF_SYS_INI_FILE
assert_f SYSCONF_ETC_SYS_INI_FILE
assert_f SYSCONF_ATB_SYS_INI_FILE
assert_f SYSCONF_SCF_SYS_INI_FILE
assert_f SYSCTRL_ETC_SYS_INI_FILE
assert_f SYSCTRL_ATB_SYS_INI_FILE
assert_f SYSCTRL_SCF_SYS_INI_FILE
assert_f TC_SYS_TC_FILE
assert_f OPKG_CMDS_SYS_FILE
assert_f DC2C_SYS_CONF_JSON
assert_f DC2C_SYS_SERIAL_JSON
assert_f DC2C_SYS_CASH_JSON
assert_f DC_PSA_DC_FILE
assert_f ATBQT_ATB_PSA_INI_FILE
assert_f ATBQT_APP_PSA_INI_FILE
assert_f ATBQT_ETC_PSA_INI_FILE
assert_f ISMASMGRATB_PSA_INI_FILE
assert_f ISMASMGRAPP_PSA_INI_FILE
assert_f ISMASMGRETC_PSA_INI_FILE
assert_f ISMASMGRSCF_PSA_INI_FILE
assert_f SYSCONF_ETC_PSA_INI_FILE
assert_f SYSCONF_ATB_PSA_INI_FILE
assert_f SYSCONF_SCF_PSA_INI_FILE
assert_f SYSCTRL_ETC_PSA_INI_FILE
assert_f SYSCTRL_ATB_PSA_INI_FILE
assert_f SYSCTRL_SCF_PSA_INI_FILE
assert_f ATB_PSA_INI_FILE
assert_f TC_PSA_TC_FILE
assert_f PSA_UPDATE_CONF
assert_f OPKG_CMDS_PSA_FILE
assert_f DC2C_PSA_CONF_JSON
assert_f DC2C_PSA_SERIAL_JSON
assert_f DC2C_PSA_CASH_JSON
readonly KNOWN_SYS_DIRS=($ETC_SYS_DIR
$ATB_SYS_DIR
$DC_SYS_DIR
$TARIFF_SYS_DIR
$OPKG_SYS_DIR
$CONF_SYS_DIR
$OPT_SYS_DIR
$APP_SYS_DIR
$ATBAPP_SYS_DIR
$SYSCONFIG_SYS_DIR)
readonly PSA_ATB_SYS_DIR="${CUSTOMER_BASE_DIR}${ATB_SYS_DIR}"
assert_d PSA_ATB_SYS_DIR
readonly PSA_BASE_INI_DIR="${CUSTOMER_BASE_DIR}/opt/app"
assert_d PSA_BASE_INI_DIR
readonly SYSCONFIG_SYS_DIR="/opt/app/sysconfig"
assert_d SYSCONFIG_SYS_DIR
readonly PSA_SYSCONFIG_DIR="${CUSTOMER_BASE_DIR}${SYSCONFIG_SYS_DIR}"
assert_d PSA_SYSCONFIG_DIR
readonly PSA_ISMASMGR_DIR="${PSA_BASE_INI_DIR}/ISMASMgr"
assert_d PSA_ISMASMGR_DIR
readonly CONF_SYS_DIR="/etc/psa_config"
assert_d CONF_SYS_DIR
readonly OPKG_SYS_DIR="/etc/psa_update"
assert_d OPKG_SYS_DIR
readonly KNOWN_PSA_DIRS=($ETC_PSA_DIR
$ATB_PSA_DIR
$DC_PSA_DIR
$TARIFF_PSA_DIR
$OPKG_PSA_DIR
$CONF_PSA_DIR
$OPT_PSA_DIR
$APP_PSA_DIR
$ATBAPP_PSA_DIR
$SYSCONFIG_PSA_DIR)
readonly ATBAPP_SYS_DIR="/opt/app/ATBAPP"
assert_d ATBAPP_SYS_DIR
readonly PSA_ATBQT_DIR="$CUSTOMER_BASE_DIR$ATBAPP_SYS_DIR"
assert_d PSA_ATBQT_DIR
readonly TARIFF_CURRENT="tariff.current"
readonly TARIFF_CURRENT_FULL="${PSA_ATBQT_DIR}/$TARIFF_CURRENT"
assert_f TARIFF_CURRENT_FULL
readonly ATBQT_INI="ATBQT.ini"
readonly ATBQT_INI_FULL="${PSA_ATBQT_DIR}/$ATBQT_INI"
assert_f ATBQT_INI_FULL
readonly ATBQT="ATBQT"
readonly ATBQT_SYS_FULL="${ATBAPP_SYS_DIR}/$ATBQT"
assert_f ATBQT_SYS_FULL
readonly ISMASMGR_INI="ISMASMgr.ini"
readonly ISMASMGR_SYS_DIR="/opt/app/ISMASMgr"
assert_d ISMASMGR_SYS_DIR
readonly ISMASMGR_ISMASMGR_INI_FULL="${PSA_ISMASMGR_DIR}/$ISMASMGR_INI"
assert_f ISMASMGR_ISMASMGR_INI_FULL
readonly SYSCONFIG_ISMASMGR_INI_FULL="${PSA_SYSCONFIG_DIR}/ISMASMgr.ini"
assert_f SYSCONFIG_ISMASMGR_INI_FULL
readonly ATB_ISMASMGR_INI_FULL="${PSA_ATB_SYS_DIR}/$ISMASMGR_INI"
assert_f ATB_ISMASMGR_INI_FULL
readonly SYS_CONFIG_INI="sysconfig.ini"
readonly __sysc_sysc_full="${PSA_SYSCONFIG_DIR}/$SYS_CONFIG_INI"
readonly SYSCONFIG_SYSCONFIG_INI_FULL="$__sysc_sysc_full"
assert_f SYSCONFIG_SYSCONFIG_INI_FULL
readonly ATB_SYSCONFIG_INI_FULL="${PSA_ATB_SYS_DIR}/$SYS_CONFIG_INI"
assert_f ATB_SYSCONFIG_INI_FULL
readonly "SYSTEM_CONTROL_INI"="SystemControl.ini"
local __sysctrl_ini_full="${PSA_SYSCONFIG_DIR}/$SYSTEM_CONTROL_INI"
readonly SYSCONFIG_SYSCTRL_INI_FULL="$__sysctrl_ini_full"
assert_f SYSCONFIG_SYSCTRL_INI_FULL
readonly ATB_SYSCTRL_INI_FULL="${PSA_ATB_SYS_DIR}/$SYSTEM_CONTROL_INI"
assert_f ATB_SYSCTRL_INI_FULL
readonly ATB_ATBQT_INI_FULL="${PSA_ATB_SYS_DIR}/$ATBQT_INI"
assert_f ATB_ATBQT_INI_FULL
readonly DC2C_SERIAL_JSON="${PSA_CONFIG_DIR}/DC2C_serial.json"
assert_f DC2C_SERIAL_JSON
readonly DC2C_CASH_JSON="${PSA_CONFIG_DIR}/DC2C_cash.json"
assert_f DC2C_CASH_JSON
readonly DC2C_CONF_JSON="${PSA_CONFIG_DIR}/DC2C_conf.json"
assert_f DC2C_CONF_JSON
local DC2C_PRINT_JSON=()
for i in {1..32}; do # up to 32 print-json-files
local __f=${CONF_PSA_DIR}/DC2C_print$(printf "%02d" $i).json
local __f=${PSA_CONFIG_DIR}/DC2C_print$(printf "%02d" $i).json
readonly DC2C_PRINT$(printf "%02d" $i)_JSON=$__f
# local __g=$(eval echo '$'DC2C_PRINT$(printf "%02d" $i)_JSON)
assert_f DC2C_PRINT$(printf "%02d" $i)_JSON
DC2C_PRINT_JSON+=($__f)
done
readonly KNOWN_CONF_FILES=(${CUSTOMER_LOCATION}/update.conf \
${DC2C_PRINT_JSON[@]##*${CUSTOMER_ID}/} \
${DC2C_PSA_CONF_JSON##*${CUSTOMER_ID}/} \
${DC2C_PSA_CASH_JSON##*${CUSTOMER_ID}/} \
${DC2C_PSA_SERIAL_JSON##*${CUSTOMER_ID}/})
readonly OPKG_CMDS_FILE="${PSA_UPDATE_DIR}/opkg_commands"
assert_f OPKG_CMDS_FILE
readonly KNOWN_INI_FILES=(${ATBAPP_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${ISMASMGRATB_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${ISMASMGRAPP_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${ISMASMGRETC_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${ISMASMGRSCF_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${SYSCONF_ETC_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${SYSCONF_ATB_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${SYSCONF_SCF_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${SYSCTRL_ETC_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${SYSCTRL_ATB_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${SYSCTRL_SCF_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${ATBQT_ATB_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${ATBQT_APP_PSA_INI_FILE##*${CUSTOMER_ID}/} \
${ATBQT_ETC_PSA_INI_FILE##*${CUSTOMER_ID}/})
# TODO: anpassen, da z.B. fuer szeged mehrere zonen vorhanden sind
readonly KNOWN_CONF_FILES=(${CUSTOMER_LOCATION}/update.conf \
${DC2C_PRINT_JSON[@]##*${CUSTOMER_ID}/} \
${DC2C_CONF_JSON##*${CUSTOMER_ID}/} \
${DC2C_CASH_JSON##*${CUSTOMER_ID}/} \
${DC2C_SERIAL_JSON##*${CUSTOMER_ID}/})
readonly KNOWN_INI_FILES=(${ATBQT_INI_FULL##*${CUSTOMER_ID}/} \
${ISMASMGR_ISMASMGR_INI_FULL##*${CUSTOMER_ID}/} \
${SYSCONFIG_ISMASMGR_INI_FULL##*${CUSTOMER_ID}/} \
${SYSCONFIG_SYSCONFIG_INI_FULL##*${CUSTOMER_ID}/} \
${SYSCONFIG_SYSCTRL_INI_FULL##*${CUSTOMER_ID}/} \
${ATB_ISMASMGR_INI_FULL##*${CUSTOMER_ID}/} \
${ATB_SYSCONFIG_INI_FULL##*${CUSTOMER_ID}/} \
${ATB_SYSCTRL_INI_FULL##*${CUSTOMER_ID}/} \
${ATB_ATBQT_INI_FULL##*${CUSTOMER_ID}/})
readonly KNOWN_FILES=(${KNOWN_CONF_FILES[@]} \
${KNOWN_INI_FILES[@]} \
${OPKG_CMDS_PSA_FILE##*${CUSTOMER_ID}/})
${OPKG_CMDS_FILE##*${CUSTOMER_ID}/})
log_debug "known conf/ini_files ->"
for (( i=0; i < ${#KNOWN_FILES[@]}; ++i )); do

View File

@ -163,63 +163,59 @@ check_md5_for_changed_json_and_ini_files () {
local __bn=$(basename $file .$__fsuffix)
if [[ "$file" =~ .*dc2c.hex.* ]]; then
js_key=".dc.dc2c.$__bn"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)"
elif [[ "$file" =~ .*cash[.]json.* ]]; then
js_key=".conf.$__cl.zg[1].z[1].etc.psa_config.$__bn"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)"
elif [[ "$file" =~ .*print[0-9][0-9][.]json.* ]]; then
js_key=".conf.$__cl.zg[1].z[1].etc.psa_config.$__bn"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)"
elif [[ "$file" =~ .*conf[.]json.* ]]; then
js_key=".conf.$__cl.zg[1].z[1].etc.psa_config.DC2C_conf"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)"
elif [[ "$file" =~ .*serial[.]json.* ]]; then
js_key=".conf.$__cl.zg[1].z[1].etc.psa_config.DC2C_serial"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)"
elif [[ "$file" =~ .*atb/ATBQT[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].etc.atb.ATBQT"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $ATB_ATBQT_INI_FULL)"
elif [[ "$file" =~ .*ATBQT[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].opt.app.ATBAPP.ATBQT"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $ATBQT_INI_FULL)"
elif [[ "$file" =~ .*atb/sysconfig[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].etc.atb.sysconfig"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $ATB_SYSCONFIG_INI_FULL)"
elif [[ "$file" =~ .*sysconfig[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].opt.app.sysconfig.sysconfig"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository=$(md5_of $SYSCONFIG_SYSCONFIG_INI_FULL)
elif [[ "$file" =~ .*atb/SystemControl[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].etc.atb.SystemControl"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $ATB_SYSCTRL_INI_FULL)"
elif [[ "$file" =~ .*SystemControl[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].opt.app.sysconfig.SystemControl"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository=$(md5_of $SYSCONFIG_SYSCTRL_INI_FULL)
elif [[ "$file" =~ .*atb/ISMASMgr[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].etc.atb.ISMASMgr"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $ATB_ISMASMGR_INI_FULL)"
elif [[ "$file" =~ .*etc/ISMASMgr[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].etc.ISMASMgr"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository="$(md5_of $ATB_ISMASMGR_INI_FULL)"
elif [[ "$file" =~ .*ISMASMgr/ISMASMgr[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].opt.app.ISMASMgr.ISMASMgr"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository=$(md5_of $ISMASMGR_ISMASMGR_INI_FULL)
elif [[ "$file" =~ .*sysconfig/ISMASMgr[.]ini.* ]]; then
js_key=".ini.$__cl.zg[1].z[1].opt.app.sysconfig.ISMASMgr"
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
md5sum_update_conf=$(cat $UPDATE_CONF | jq -r $js_key)
md5sum_repository=$(md5_of $SYSCONFIG_ISMASMGR_INI_FULL)
else
continue
@ -402,14 +398,6 @@ check_for_apism () {
nc localhost 7778
}
get_customer_id () {
echo $(cat CUST_ID_FILE)
}
get_zone_nr () {
echo $(cat ZONE_FILE)
}
get_plugins () {
local __plugins=""
for __f in /opt/app/ATBAPP/plugins/*; do

View File

@ -16,7 +16,7 @@ collect_current_configuration () {
# TODO: eventuell muss die version neu berechnet werden
current_settings_to_ismas
#for line in $(cat $PSA_UPDATE_CONF |\
#for line in $(cat $UPDATE_CONF |\
# jq -r .conf.szeged.zg[1].z[1].etc.psa_config)
#do
# conf_file="$(echo $line |