Apologies...
Some virus gateways appear to have picked up the .scr file I sent as an
attachment to be a virus, it's not even executable on a windows platform (as
you can see from below) and is harmless.  My original message follows (if
anybody is brave enough to read it of course!)  My fault... I should have
renamed it.
Hello all
I'm having a few issues with a caa start script on our cluster.  If you run
the script alone, it starts the application (oninit - Informix) fine and
returns the necessary error codes etc.
However, if you trigger the script using:
caa_start informix_live
or do the same from the sysman gui, caa tells you it's started correctly and
is online on it's favored member - yet, it's not.  The check subsequently
takes the application offline.
It appears that the oninit process get's terminated by the caa stuff (or
terminates itself) , as the informix log indicates it only gets through the
first few steps of it's initialisation.
I thought this might be down to not being attached to a terminal or
something so I rewrote the script to use expect and I still get the same
behaviour.  Again, the script is fine if you run it from the command line.
I've tried unregistering, deleting the profile, creating the profile and
re-registering.  Still the same...
Any ideas are greatly appreciated
Scripts follow...
informix_live.scr ----->
#!/usr/bin/ksh -p
#
# This action script starts and stops informix live
#
PATH=/sbin:/usr/sbin:/usr/bin:/usr/local/bin
LD_LIBRARY_PATH=/usr/local/lib
export PATH
export LD_LIBRARY_PATH
CAATMPDIR=/tmp
case $1 in
'start')  # Start up Informix OnLine instance (live)
        echo "Starting Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        expect -f /var/cluster/caa/script/oninit.expect
        exit 0
        ;;
'stop')   # Shutdown OnLine instance (live)
        echo "Stopping Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        expect -f /var/cluster/caa/script/onmode.expect
        sleep 2
        exit 0
        ;;
'check')	# Check OnLine instance (live)
        echo "Checking Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        # Can we see an informix server?
        onstat - 2>&1 > /dev/null
        ONSTATERRORCODE=$?
        case $ONSTATERRORCODE in
        -1)    # Offline
            echo "Informix is offline, cannot continue"
            exit 1
            ;;
        0)     # Initialisation
            echo "Server is still initialising, cannot continue"
            exit 0
            ;;
        2)     # Recovery
            echo "Server is in recovery mode, cannot continue"
            exit 0
            ;;
        3)     # Backup
            echo "Backup is already taking place, cannot continue"
            exit 0
            ;;
        4)     # Shutdown
            echo "Server is shutting down, cannot continue"
            exit 1
            ;;
        5)     # Online
            exit 0
            ;;
        6)     # Abort
            echo "Server is aborting, cannot continue"
            exit 1
            ;;
        255)   # SHM not initialised
            echo "Server is not initialised"
            exit 1
            ;;
        esac
        ;;
esac
oninit.expect ----->
#!/usr/local/bin/expect -f -d
if {[fork]!=0} exit
disconnect
system oninit
onmode.expect ----->
#!/usr/local/bin/expect -f -d
if {[fork]!=0} exit
disconnect
system onmode -yuck
Cy Michael Dewhurst
Computer Systems Manager
Royal Bournemouth & Christchurch Hospitals NHS Trust
Education Centre
Castle Lane East
Bournemouth
BH7 7DW
Tel:  +44 (0) 1202 704487
Fax:  +44 (0) 1202 704108
Received on Fri Jul 20 2001 - 12:50:58 NZST