ul11u4 gate open checks for queued RTIs
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user