- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rc shutdown scripts
Operating System - HP-UX
1823057
Members
3165
Online
109645
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО02-03-2005 07:26 AM
тАО02-03-2005 07:26 AM
Hi,
I would like to shutdown a particular app upon reboot and need step by step instructions regarding how. We are using 11i.
As I understand it, I can create my script in /sbin/init.d and then link this to /sbin/rc0.d. So for example, I have /sbin/init.d/stoptivoli. What do I do then? I never linked before. I know ultimately I'm supposed to end up with a K script in /sbin/rc0.d that links to /sbin/init.d/stoptivoli.
Hope this makes sense...thanks
I would like to shutdown a particular app upon reboot and need step by step instructions regarding how. We are using 11i.
As I understand it, I can create my script in /sbin/init.d and then link this to /sbin/rc0.d. So for example, I have /sbin/init.d/stoptivoli. What do I do then? I never linked before. I know ultimately I'm supposed to end up with a K script in /sbin/rc0.d that links to /sbin/init.d/stoptivoli.
Hope this makes sense...thanks
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 07:37 AM
тАО02-03-2005 07:37 AM
Solution
You probably don't want /sbin/rc0.d. The number after the rc is the run level. You most likely want run-level 3 (after networking is up).
So, what you would do is put the start link in /sbin/rc3.d and the kill link in /sbin/rc2.d. That way when the server transitioned into run level 3 (at bootup) it starts the application, and when it transitions to run level 2 (during shutdown) it executes the shutdown.
First thing is the file in /sbin/init.d This script should be able to start and stop the application depending on the argument. /sbin/init.d/template can give you a starting ground to writing this type of script.
To create the links (assuming your script name is myapp)
ln - s /sbin/init.d/myapp /sbin/rc3.d/Smyapp
ln -s /sbin/init.d/myapp /sbin/rc2.d/Kmyapp
The in the above controls the order. The higher the number the further in the process it occurs. I was always taught that the S + the K should equal 1000. So if you use S900, then it should be K100. This helps to keep consistancy in the startup/shutdown. I would suggest you use a high number like 900+ in order to allow all HP standard software to startup first.
So, what you would do is put the start link in /sbin/rc3.d and the kill link in /sbin/rc2.d. That way when the server transitioned into run level 3 (at bootup) it starts the application, and when it transitions to run level 2 (during shutdown) it executes the shutdown.
First thing is the file in /sbin/init.d This script should be able to start and stop the application depending on the argument. /sbin/init.d/template can give you a starting ground to writing this type of script.
To create the links (assuming your script name is myapp)
ln - s /sbin/init.d/myapp /sbin/rc3.d/S
ln -s /sbin/init.d/myapp /sbin/rc2.d/K
The
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 07:40 AM
тАО02-03-2005 07:40 AM
Re: rc shutdown scripts
Most user created startup commands go in run level 3. A few in run level 2.
For oracle and other applications:
S(tart) script goes in /sbin/rc3.d
K(ill) script goes in /sbin/rd2.d
SEP
For oracle and other applications:
S(tart) script goes in /sbin/rc3.d
K(ill) script goes in /sbin/rd2.d
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP