HP/UX fixes

This commit is contained in:
2025-10-28 11:02:06 -04:00
parent 67050cf3a0
commit 6c1f8c926e
6 changed files with 210 additions and 82 deletions

View File

@@ -21,7 +21,6 @@ get_short_hostname() {
}
HOST=$(get_short_hostname)
# Detect OS and set DATE variable appropriately
os_name=$(uname -s)
case "$os_name" in
@@ -50,28 +49,24 @@ echo "`$DATE` -$$-: CALLED $0 $@" >> $LOGFILE
trap ctrl_c INT
ctrl_c() {
echo "`$DATE` -$$-: TRAPPED CTRL-C - EXITING" >> $LOGFILE
exit_with_error
}
ctrl_c_inhibit() {
echo "`$DATE` -$$-: TRAPPED CTRL-C - CONTINUING" >> $LOGFILE
}
exit_with_error() {
# if [ $usingsatoken ]; then
# ENDPOINT="https://$RUBRIK_IP/api/internal/session/me"
# rest_api_delete
# check_http_error
# fi
ENDPOINT="https://$RUBRIK_IP/api/v1/session/me"
rest_api_delete
check_http_error
cat /tmp/rbkresponse.$$ | mailx -s "Backup error on ${HOST} for ${ORACLE_SID}. Please investigate" $ALERT_EMAILS
#rm -f /tmp/rbkresponse.$$
rm -f /tmp/rbkresponse.$$
rm -f /tmp/mountedDBs.$$
rm -f $PIDFILE
rm -f $PIDFILE
echo Aborting Script!
echo "`$DATE` -$$-: EXITED WITH ERROR $0 $@" >> $LOGFILE
exit 1
@@ -301,12 +296,9 @@ close_mv() {
}
cleanup() {
# if [ $usingsatoken ]; then
# ENDPOINT="https://$RUBRIK_IP/api/internal/session/me"
# rest_api_delete
# fi
echo "`$DATE` -$$-: EXITED $0 $@" >> $LOGFILE
#rm -f /tmp/mountedDBs.$$
#rm -f /tmp/rbkresponse.$$
ENDPOINT="https://$RUBRIK_IP/api/v1/session/me"
rest_api_delete
echo "`$DATE` -$$-: EXITED $0 $@" >> $LOGFILE
rm -f /tmp/rbkresponse.$$
rm -f $PIDFILE
}