Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
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 am runnign the following files to start two items in rc5.d/S99local:
rm -rf /opt/oracle/product/9.2.0/oracm/log/ocmstart.ts >>/tmp/startlog
export ORACLE_HOME=/opt/oracle/product/9.2.0/
/opt/oracle/product/9.2.0/oracm/bin/ocmstart.sh >>/tmp/startlog
su - oracle -c "/opt/oracle/product/9.2.0/bin/gsdctl start" >>/tmp/startlog
This seems to be working fine, but I am wanting this to work via chkconfig. I have written the following script in init.d/oracm_gsd, but I canot start or stop this as a service and it even though it pushed the appropriate K and S scripts into rc5.d and rc6.d the script(s) don't seem to be starting and stopping properly. It will not work on a reboot, nor can I use service oracm_gsd to start or stop these items. Here is the script:
#!/bin/bash
#
# chkconfig: 345 90 10
# description: This controls the oracm and the gsdctl start and stop
The script that you are having chkconfig place into init.d/oracm_gsd is incomplete. You have defined the start, stop, and restart functions but then you never actually issue a start, stop, or restart command. Therefore when init.d/oracm_gsd is executed your script does not do anything.
Originally posted by jailbait The script that you are having chkconfig place into init.d/oracm_gsd is incomplete. You have defined the start, stop, and restart functions but then you never actually issue a start, stop, or restart command. Therefore when init.d/oracm_gsd is executed your script does not do anything.
----------------------------
Steve Stites
What do you mean "Issue a start, stop, or restart"? I thought that anything listed under the start {} ( section would run when I do a service oracm_gsd start command. What am I missing? Can you give me an example please?
"What do you mean "Issue a start, stop, or restart"? I thought that anything listed under the start {} ( section would run when I do a service oracm_gsd start command."
True, but you have not enterd any commands into init.d/oracm_gsd.
"What am I missing? "
You have no commands in your script.
"Can you give me an example please?"
Here is an example of executing a start command as you define it:
#
# chkconfig: 345 90 10
# description: This controls the oracm and the gsdctl start and stop
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.