Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running Redhat Enterprise 3 AS on a Dell Optiplex G-270. All the latest updates have been applied.
I've constructed a script called /etc/init.d/suuce10 that starts up my Oracle db and shuts it down as per the usual init.d way.
Executed:
chkconfig --add suuce10
chkconfig --level 35 on
chkconfig --level 016 off
When the machine boots I see the message "Starting suuce10:", and everything works OK.
When I do an init 0|1|6 the stop portion of the script does not seem to execute. When I go into single user mode the db is still up and running fine. I'd like it shutdown at that point.
When I go to /etc/rc6.d and issue the command: ./K99suuce10 stop, then everything works fine. But, if Oracle is started and I reboot the maching no Oracle shutdown seems to happen.
No "Stopping suuce10:" message appears on shutdown/reboot.
"Startting suuce10:" does appear on startup.
I constructed a do nothing test program: /etc/init.d/test. It starts up but won't shut down.
Can anyone please H E L P. . .
file ownership is root.root and protection is 755
I've tried changing the relative numbers for K & S symbolic scripts.
As you probably know, Oracle won't let root effect startups and shutdowns. These have to be done by the oracle account owner, unless unusual provisions are made.
#!/bin/bash
#
# chkconfig: 35 99 99
# description: SUU db startup/shutdown script
#
start ()
{
su - oracle -c '/home/oracle/bin/cecms start'
su - oracle -c '/home/oracle/bin/oralistener start'
}
stop ()
{
su - oracle -c '/home/oracle/bin/cecms stop'
}
Yes, I saw the echo commands yesterday as I was grepping the /etc/init.d files. However, please keep in mind that I'm not asking how to get "Stopping suuce10:" to print on the screen, it is that suuce10 is NOT being executed to shutdown that component as the system changes run levels.
It's like Yule Brenner said in, The King And I, "Is a puzzlement!"
/etc/suuce10 runs from the command line without errors for both stop and start as $1.
The links are managed by chkconfig.
When booting the system I see "Starting suuce10:" whether or not I have echo commands in my init.d script. It works perfectly on the way up.
I've changed the K numbers again. I have one link named /etc/rc1.d/K60suuce10. When I do the following command it works perfectly.
/etc/rc1.d/K60suuce10 stop
But, when I do an init 1, and go to single user mode, I see no evidence that "suuce10 stop" is being executed. And indeed, if i grep my processes, it show that both Oracle and the listener are still active and running. This confirms that suuce10 did not run even though I've added echo commands to my script and have a working link in my rc1.d directory.
i don't use redhat but in debian there is a command to do it : update-rc.d suuce.sh defaults, so their should be something like that for redhat/fedora check a man -k rc.d
Red Hat Linux (rhel 5) Oracle 10g shutdown/startup
Not sure of rhel3, but here's what I did to get Oracle to start up and shut down properly on Red Hat Enterprise Linux 5 (64bit) running selinux:
1. Place startup script (at bottom) in /etc/init.d, change perms accordingly
2. Ensure script has the chkconfig comments in it!
The numbers mean start oracle on init state 3, 4, and 5. Bring it up on order number 99, and down on order number 10
3. Run this to import startup into chkconfig:
# chkconfig --add dbora (the "dbora" needs to correspond to the startup script in /etc/init.d)
4. Run:
# chkconfig --list dbora (this shows what the startup/shutdown modes are set to, and should match the startup script)
5. Be sure to touch /var/lock/subsys/dbora every time system reboots to ensure stop routine is properly called
6. May need to inject sleep statements in the dbora script as the listener needs to be fully up before moving on (I put in sleeps between all start calls)
7. Note I used "runuser" instead of "su" - had to do this due to SELinux security
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.