I have a simple script to startup/shutdown Oracle database at boot time. I
put this script under /etc/rd.d/init.d. Then I created a symbolic link in
/etc/rc.d/rc3.d/S88Oracle and /etc/rc.d/rc0.d/K88Oracle linking to my
When the default run level is set to 3, Oracle is started up ok. But when I
change the default run level to 5, the script is not invoked. Also, in both
default levels (3 and 5), the script is not invoked with "stop" passed in.
I verified this by looking on the startup console and also in
Apparently, when default level is 5, some (not all) startup scripts in
level 3 are skipped for some reasons.
My script is attached:
# Source function library.
case "$1" in
echo -n "Starting ORACLE:"
if [ ! -f $ORACLE_HOME/bin/dbstart ]
failure "Oracle startup"
# additional swap file
# bring up/down ORACLE
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart &
success "Oracle startup"
echo -n "Shutting down ORACLE:"
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut &
success "Oracle shutdown"
? If you want it to run in runlevel 5, you need
links in rc5.d, not rc3.d...
Are you telling me that only start scripts at the default run levels executed?
If this is true, init behaves differently with other platforms where all levels
below default level are also executed.
Is it the same for kill scripts?
Yes; kill scripts are only executed for the specific runlevel
you're entering; for halting that's runlevel 0; for rebooting
that's runlevel 6.