Capture Avamar backup exit status for use in postscript
I have some very specific backups on some of my Linux servers that I need to know immediately if they succeeded or failed, and have the postscript take appropriate action. Using the Avamar reports functionality is not acceptable for this, due to the sensitive nature of the data being backed up and other security rules I am forced to follow. So what I need is a way for a postscript to find out the exit status of the backup that just ended and take action. I've tried using the $? shell variable in the script, but it appears this is always zero as the postscript always processes the success path even if the backup failed. Can anyone please help me find a simple answer?
FYI, this is an Avamar v6.0.2 environment, and the Linux server is a SuSE Enterprise 11.1 running v6.0.101-65 of the Avamar client.