- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: run script when system reboot
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2004 01:44 PM
тАО06-28-2004 01:44 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2004 02:11 PM
тАО06-28-2004 02:11 PM
Solution(/sbin/rc3.d/K090dbshut and /sbin/rc4.d/S910dbstart)
It is a little difficult giving an example when we don't know what database you have or it may be configured on your system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2004 02:36 PM
тАО06-28-2004 02:36 PM
Re: run script when system reboot
what is mean of K090 and S910 , is it meaningful ? just add K090 + script ( eg. K090myscript )to your said path is OK ? Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2004 03:35 PM
тАО06-28-2004 03:35 PM
Re: run script when system reboot
A symbolic link is then created for both the shutdown run level, generally rc3.d (K090) and startup /sbin/rc4.d (S910).
The naming convention is that both of these numbers add up to 1000. (combination of S910 and K090) (this process of the actual run level numbering will vary from site to site.)
The script itself if written correctly that the Kxxx shutsdown the process/package and Sxxx will start it.
Having the script in as Kxxx instead of a link will work, but it is not a standard practise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2004 01:50 AM
тАО06-30-2004 01:50 AM
Re: run script when system reboot
Make sure that /etc/oratab is set up correctly. If you can do a dbstart and a dbshut then it is working correctly.
Look at some of the scripts on /sbin/init.d to see how they work.
The standard scripts take one argument. This argument will have a value of:
start_msg
stop_msg
start
stop
start_msg and stop_msg cause the script to print a display on the console. This is typically Starting Oracle, Stopping Oracle. This is what makes the cute little status lines during startup and shutdown
There is usually a case statement in the script that branches on the message values. As I said earlier, the start_msg and stop_msg will branch down and echo the messages on the console.
The start branch will typically do
su - oracle -c dbstart
and the stop branch will be
su - oracle -c dbshut
I've found that I've had to modify the dbshut script so that it does an immediate shutdown. Otherwise, oracle will not shutdown until everyone has logged off.
-Good Luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2004 01:58 AM
тАО06-30-2004 01:58 AM
Re: run script when system reboot
So pick a high S number, like S990, since the startup scripts run in numerical order:
S001
S002
...
S099
S100
...
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2004 02:35 AM
тАО06-30-2004 02:35 AM
Re: run script when system reboot
Have a look at this threads below:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=450287
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=391167
Regards,