Startup / Shutdown script problem: please help
Hello Forum
I try to setup gracefull startup/shutdown of Sybase server on Sun 10.
After following instructions on internet we created links /etc/rc3.d/S97LIVPSYNAD01_AXS and /etc/rc0.d/K97LIVPSYNAD01_AXS.
They both are links: K97LIVPSYNAD01_AXS -> /etc/init.d/S105_LIVPSYNAD01_AXS
and S97LIVPSYNAD01_AXS -> /etc/init.d/S105_LIVPSYNAD01_AXS .
init.d file is link to actual file in Sybase directory:
lrwxrwxrwx 1 root other 60 May 25 19:02 /etc/init.d/S105_LIVPSYNAD01_AXS -> /opt/sybase/syb_125_64/ASE-12_5/install/S105_LIVPSYNAD01_AXS
Both links in rc3.d and rc0.d are working fine if executed interactively with 'start' and 'stop' input parms supplied.
However the actual server startup and shutdown does not seem to execute 'rc' links with parms 'start' and 'stop'.
Can you help to understand what's wrong?
Are states 3 and 0 is a good place for startup and shutdown scripts? Is there anywhere log of the startup loop which would show why my links are skipped or not executed.
Here is the version of os:
SunOS host01 5.8 Generic_117350-20 sun4u sparc SUNW,Sun-Fire
... and script/opt/sybase/syb_125_64/ASE-12_5/install/S105_LIVPSYNAD01_AXS
--------------------------------------------
#!/bin/ksh
set -x
export RUNAS=sybase
SYB_INSTALL=/opt/sybase/syb_125_64/ASE-12_5/install
case $1 in
'start')
# recall the script as the non-priviliged user
echo "Starting up xxx_AXS"
su $RUNAS -c ". /opt/sybase/syb_125_64/SYBASE.sh
$SYB_INSTALL/RUN_xxx_AXS &
sleep 30
$SYB_INSTALL/RUN_xxx_AXS_back &
"
;;
'stop')
echo "Shutting Down xxx_AXS"
su $RUNAS -c ". /opt/sybase/syb_125_64/SYBASE.sh
/opt/sybase/syb_125_64/OCS-12_5/bin/isql -U sa -P xxx -S xxx_AXS
<<!
use ctnapr76
go
checkpoint
go
shutdown SYB_BACKUP
go
shutdown with nowait
go
!"
;;
*)
echo "Usage: $0 start|stop" >&2
exit 1
;;
esac
exit 0