Bug 11030 - startup script not invoked when run level < default level
startup script not invoked when run level < default level
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: SysVinit (Show other bugs)
6.1
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-04-25 09:22 EDT by carlosqg
Modified: 2014-03-16 22:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-04-25 17:02:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description carlosqg 2000-04-25 09:22:41 EDT
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
script.

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
/var/log/messages file.

Apparently, when default level is 5, some (not all) startup scripts in
level 3 are skipped for some reasons.

I'm using:

SysVinit-2.77-2
initscripts-4.7.0-1

My script is attached:

#!/bin/sh

# Source function library.
. /etc/rc.d/init.d/functions

ORACLE_HOME=/opt/oracle/8i/u01/app/oracle/product/8.1.5
ORACLE_OWNER=oracle

case "$1" in
start)
	echo -n "Starting ORACLE:"

	if [ ! -f $ORACLE_HOME/bin/dbstart ]
	then
		failure "Oracle startup"
	fi

	# additional swap file
	/sbin/swapon /var/swap

	# bring up/down ORACLE
	su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart &

	success "Oracle startup"
	;;

stop)
	echo -n "Shutting down ORACLE:"

	su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut &

	/sbin/swapoff /var/swap

	success "Oracle shutdown"
	;;
esac
Comment 1 Bill Nottingham 2000-04-25 11:49:59 EDT
? If you want it to run in runlevel 5, you need
links in rc5.d, not rc3.d...
Comment 2 Anonymous 2000-04-26 10:34:59 EDT
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?
Comment 3 Bill Nottingham 2000-04-26 11:14:59 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.