logging EXITCODE

This commit is contained in:
2022-06-05 15:28:55 +02:00
parent 33a6dcb181
commit 32fab5c34b

View File

@@ -51,6 +51,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -93,6 +94,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -108,6 +110,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -138,6 +141,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -172,6 +176,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -191,6 +196,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -211,6 +217,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -241,6 +248,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -260,6 +268,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -279,6 +288,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -298,6 +308,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
EXITCODE=$((EXITCODE+1))
test $EXITCODE -gt 125 && EXITCODE=125
log_debug "${FUNCNAME[0]}:${LINENO}: EXITCODE=$EXITCODE"
return $EXITCODE
}
@@ -366,6 +377,9 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
local p=("$@")
local data="#M=APISM#C=CMD_SENDVERSION#J=
{
\"VERSION_INFO\" : {
\"CREATED\":\"$(date +%Y-%m-%dT%T)\"
},
\"TARIFF\": {
$(<$TARIFF_CURRENT_FULL)
},
@@ -408,10 +422,11 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
}
}
}"
log_debug "$func:${LINENO}: data=$data"
log_debug "$func:${LINENO}: data=$data EXITCODE=$EXITCODE"
echo $((echo "$data"; sleep 1) | nc localhost $APISM_DB_PORT)
# if [ $EXITCODE -eq $RC_SUCCESS ]; then
update_psa_update_succeeded $UPDATE_SUCCEEDED \
$RC_SUCCESS "psa update succeeded"