Compare commits
3 Commits
73a18d5615
...
66511262e1
Author | SHA1 | Date | |
---|---|---|---|
66511262e1 | |||
21591d8e3d | |||
a3e311e375 |
@ -145,7 +145,7 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
|||||||
# Zone aus /etc/zone_nr auslesen
|
# Zone aus /etc/zone_nr auslesen
|
||||||
#
|
#
|
||||||
readonly ZONE_GROUP=1
|
readonly ZONE_GROUP=1
|
||||||
readonly ZONE=2
|
readonly ZONE=1
|
||||||
readonly CUST_BASE_DIR="${CUST_BASE_DIRS[$ZONE]}"
|
readonly CUST_BASE_DIR="${CUST_BASE_DIRS[$ZONE]}"
|
||||||
assert_d CUST_BASE_DIR
|
assert_d CUST_BASE_DIR
|
||||||
|
|
||||||
@ -296,6 +296,7 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
|||||||
assert_f DC2C_PSA_CONF_JSON
|
assert_f DC2C_PSA_CONF_JSON
|
||||||
assert_f DC2C_PSA_SERIAL_JSON
|
assert_f DC2C_PSA_SERIAL_JSON
|
||||||
assert_f DC2C_PSA_CASH_JSON
|
assert_f DC2C_PSA_CASH_JSON
|
||||||
|
assert_f OPKG_CMDS_PSA_FILE
|
||||||
|
|
||||||
readonly KNOWN_SYS_DIRS=($ETC_SYS_DIR
|
readonly KNOWN_SYS_DIRS=($ETC_SYS_DIR
|
||||||
$ATB_SYS_DIR
|
$ATB_SYS_DIR
|
||||||
|
@ -42,9 +42,15 @@ copy () {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# macht fuer dc keinen sinn
|
# TODO: szeged darf nicht sein
|
||||||
# local sysdir=$(echo $f |
|
# local readonlt __cl=$CUSTOMER_LOCATION
|
||||||
# sed -E -e s'=(.*szeged/[0-9]/[0-9])(.*)(/.*)=\2=g')
|
# local readonly __q="'"
|
||||||
|
# xxx='$('"echo $f | sed -E -e ${__q}s=(.*$__cl/[0-9]/[0-9])(.*)(/.*)=\2=g$__q"')'
|
||||||
|
# echo $xxx
|
||||||
|
# eval "echo $xxx"
|
||||||
|
|
||||||
|
local readonly __sysdir=$(echo $f |
|
||||||
|
sed -E -e s'=(.*szeged/[0-9]/[0-9])(.*)(/.*)=\2=g')
|
||||||
|
|
||||||
# TODO: kuerzen
|
# TODO: kuerzen
|
||||||
|
|
||||||
@ -55,48 +61,53 @@ copy () {
|
|||||||
|
|
||||||
local readonly __f=${f##*/}
|
local readonly __f=${f##*/}
|
||||||
local readonly __m="${CUSTOMER_ID_BASE_DIR}/${f}"
|
local readonly __m="${CUSTOMER_ID_BASE_DIR}/${f}"
|
||||||
local __p=""
|
local __p="${__sysdir}/${__f}"
|
||||||
|
|
||||||
# echo "TEST -> $sysdir/$__f"
|
# echo "TEST -> $sysdir/$__f"
|
||||||
|
|
||||||
if grep -qE "^.*$DC\s*$" <<< ${f}; then
|
# TODO: das kopieren in die system-verzeichnisse muss noch getestet
|
||||||
__p="${DC_SYS_DIR}/${__f}"
|
# werden. stimmt noch nicht so ganz.
|
||||||
log_debug "$func:${LINENO}: __m=$__m"
|
|
||||||
elif grep -qE "^.*tariff[0-9][0-9][.]json\s*$" <<< ${f}; then
|
#if grep -qE "^.*$DC\s*$" <<< ${f}; then
|
||||||
__p="${TARIFF_SYS_DIR}/${__f}"
|
# __p="${DC_SYS_DIR}/${__f}"
|
||||||
elif grep -qE "^.*[.]json\s*$" <<< ${f}; then
|
# log_debug "$func:${LINENO}: __m=$__m"
|
||||||
__p="${CONF_SYS_DIR}/${__f}"
|
#elif grep -qE "^.*tariff[0-9][0-9][.]json\s*$" <<< ${f}; then
|
||||||
log_debug "$func:${LINENO}: __m=$__m"
|
# __p="${TARIFF_SYS_DIR}/${__f}"
|
||||||
elif grep -qE "^.*[.]ini\s*$" <<< ${f}; then
|
#elif grep -qE "^.*[.]json\s*$" <<< ${f}; then
|
||||||
if [ "$__f" = "$ATBQT_INI" ]; then
|
# __p="${CONF_SYS_DIR}/${__f}"
|
||||||
log_debug "$func:${LINENO}: __m=$__m $ATB_SYS_DIR/$__f ${f%/*}"
|
# log_debug "$func:${LINENO}: __m=$__m"
|
||||||
if grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
#elif grep -qE "^.*[.]ini\s*$" <<< ${f}; then
|
||||||
__p="$ATB_SYS_DIR/${__f}"
|
# if [ "$__f" = "$ATBQT_INI" ]; then
|
||||||
else
|
# log_debug "$func:${LINENO}: __m=$__m $ATB_SYS_DIR/$__f ${f%/*}"
|
||||||
__p="$ATBAPP_SYS_DIR/${__f}"
|
# if grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
||||||
fi
|
# __p="$ATB_SYS_DIR/${__f}"
|
||||||
elif [ "$__f" = "$SYSTEM_CONTROL_INI" ]; then
|
# else
|
||||||
if grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
# __p="$ATBAPP_SYS_DIR/${__f}"
|
||||||
__p="$ATB_SYS_DIR/${__f}"
|
# fi
|
||||||
else
|
# elif [ "$__f" = "$SYSTEM_CONTROL_INI" ]; then
|
||||||
__p="$SYSCONFIG_SYS_DIR/${__f}"
|
# if grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
||||||
fi
|
# __p="$ATB_SYS_DIR/${__f}"
|
||||||
elif [ "$__f" = "$SYS_CONFIG_INI" ]; then
|
# else
|
||||||
if grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
# __p="$SYSCONFIG_SYS_DIR/${__f}"
|
||||||
__p="$ATB_SYS_DIR/${__f}"
|
# fi
|
||||||
else
|
# elif [ "$__f" = "$SYS_CONFIG_INI" ]; then
|
||||||
__p="$SYSCONFIG_SYS_DIR/${__f}"
|
# if grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
||||||
fi
|
# __p="$ATB_SYS_DIR/${__f}"
|
||||||
elif [ "$__f" = "$ISMASMGR_INI" ]; then
|
# else
|
||||||
if grep -qE "$ISMASMGR_SYS_DIR" <<< "${f%/*}"; then
|
# __p="$SYSCONFIG_SYS_DIR/${__f}"
|
||||||
__p="$ISMASMGR_SYS_DIR/${__f}"
|
# fi
|
||||||
elif grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
# elif [ "$__f" = "$ISMASMGR_INI" ]; then
|
||||||
__p="$ATB_SYS_DIR/${__f}"
|
# if grep -qE "$ISMASMGR_SYS_DIR" <<< "${f%/*}"; then
|
||||||
else
|
# __p="$ISMASMGR_SYS_DIR/${__f}"
|
||||||
__p="$SYSCONFIG_SYS_DIR/${__f}"
|
# elif grep -qE "$ATB_SYS_DIR" <<< "${f%/*}"; then
|
||||||
fi
|
# __p="$ATB_SYS_DIR/${__f}"
|
||||||
fi
|
# else
|
||||||
fi
|
# __p="$SYSCONFIG_SYS_DIR/${__f}"
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
|
echo "XXX-- __p=$__p"
|
||||||
|
|
||||||
if [ ! -z "$__p" ]; then
|
if [ ! -z "$__p" ]; then
|
||||||
if cp "$__m" "$__p"; then
|
if cp "$__m" "$__p"; then
|
||||||
|
@ -118,7 +118,7 @@ update_psa() {
|
|||||||
# check if the opkg-command-file has been changed during 'git pull'
|
# check if the opkg-command-file has been changed during 'git pull'
|
||||||
if grep -qE ".*opkg_commands.*?" <<< $changed_files; then
|
if grep -qE ".*opkg_commands.*?" <<< $changed_files; then
|
||||||
# read opkg_cmds: each line respresents an opkg-command
|
# read opkg_cmds: each line respresents an opkg-command
|
||||||
readarray opkg_commands < <(cat $opkg_cmds_file)
|
readarray opkg_commands < <(cat $OPKG_CMDS_PSA_FILE)
|
||||||
for opkg_c in "${opkg_commands[@]}"; do
|
for opkg_c in "${opkg_commands[@]}"; do
|
||||||
if grep -qE "^\s*[#]+.*$" <<< $opkg_c; then
|
if grep -qE "^\s*[#]+.*$" <<< $opkg_c; then
|
||||||
continue # found comment line
|
continue # found comment line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user