Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a script called blueBoxT for starting and stopping Oracle and placed it in the /etc/init.d directory.

echo "blueBoxT $1 - `date '+%Y%m%d%H%M'`" >> /root/blueBoxT.log
case "$1" in
    echo "Starting Oracle"
    su - oracle -c "/home/oracle/startDBT"
    echo "Stopping Oracle"
    su - oracle -c "/home/oracle/stopDBT"
    echo "`basename $0`: usage: `basename $0` { stop | start }"
exit 0

I made the symbolic links as so...

root@dev /etc/rc.d
# find . -name *blueBox*

The log at /root/blueBoxT.log shows the start command and the Oracle instance is up.

The stop command never appears to get called. It is not in my log.

root@dev /root
# cat blueBoxT.log
blueBoxT start - 201008051323
blueBoxT start - 201008051327
blueBoxT start - 201008051346
blueBoxT start - 201008051356

I shutdown my Fedora 10 using the command...

shutdown -h now

What have I misconfigured to not be receiving the stop so that I can do an orderly shutdown of Oracle?

share|improve this question
up vote 4 down vote accepted

I don't have that version of Fedora but for RHEL5 the important part of /etc/rc.d/rc is:

[ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \
        || continue

Your problem may be that you don't touch a /var/lock/subsys/blueBox when starting.

Also the file in init.d is called blueBoxT whereas your rc?.d scripts are called K??blueBox (no trailing T) which is confusing.

share|improve this answer
K?? and S?? files in /rc?.d scripts are just symlinks back to the /etc/init.d script. They don't have to be named the same in fact due to the K??|S?? part they can't be named the same. – Zypher Aug 5 '10 at 22:50
+1, make sure to touch the lock files – James Aug 5 '10 at 22:50
I corrected the "missing T", but I don't think that was the problem. The lock seems to have done the trick! – dacracot Aug 5 '10 at 23:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.