ul11u4 gate open checks for queued RTIs

This commit is contained in:
Petr Nyc
2025-04-23 13:51:19 +02:00
parent 8ab6bd4bff
commit 89369e066d
2 changed files with 18 additions and 9 deletions

View File

@@ -5,6 +5,8 @@
trap 'exit 1' HUP INT QUIT TERM
trap 'on_error' EXIT
log::prefix() {
date=$(gdate '+%Y-%m-%d %H:%M:%S,%3N')
printf '%s %s\n' "${date}" "${*}"
@@ -31,11 +33,13 @@ log::error() {
}
log::fatal() {
reason='Unknown or not specified'
if [ "$1" ]; then
reason=$1
fi
reason="${1-Unknown or not specified}"
log::error "Fatal error. Reason: ${reason}"
kill -s TERM $$
}
on_error() {
if [ $? -ne 0 ]; then
log::fatal "Unhandled script failure"
fi
}