Use the following examples of what to add to the onbar script to print the emergency boot file if the backup is successful. Each time that you issue the onbar -b command, the emergency boot file is printed.
onbar_d "$@" # receives onbar arguments from command line
return_code = $? # check return code
# if backup (onbar -b) is successful, prints emergency boot file
if [$return_code -eq 0 -a "$1" = "-b"]; then
servernum='awk '/^SERVERNUM/ {print $2}' $INFORMIXDIR/etc/$ONCONFIG '
lpr \$INFORMIXDIR/etc/ixbar.$servernum
fi
exit $return_code
To print the backup boot files on all coservers, replace the line:
lpr \$INFORMIXDIR/etc/ixbar.$servernum
with:
xctl lpr \$INFORMIXDIR/etc/Bixbar_\'hostname\'.$servernum
If more coservers than hosts are on the system, this script prints the same boot files twice.
@echo off %INFORMIXDIR%\bin\onbar_d %* set onbar_d_return=%errorlevel% if "%onbar_d_return%" == "0" goto backupcom goto skip REM Check if this is a backup command :backupcom if "%1" == "-b" goto printboot goto skip REM Print the onbar boot file :printboot print %INFORMIXDIR%\etc\ixbar.??? REM Set the return code from onbar_d (this must be on the last line of the script) :skip %INFORMIXDIR%\bin\set_error %onbar_d_return% :end