- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- start up scripts!!
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
Forums
Discussions
Discussions
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
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-25-2001 07:59 AM
06-25-2001 07:59 AM
I believe this has to be include in the startup script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 08:13 AM
06-25-2001 08:13 AM
Re: start up scripts!!
You need to create a script in /sbin/init.d which actually does the startup and shutdown in one script (depending on wether the start or stop argument is passed to it). Then create a link in /sbin/rcX.d for the startup (usually runlevel 3 for apps) and one in /sbin/rcX.d for shutdown (usually runlevel 2). You should also create a variable script in /etc/rc.config.d which has a variable which decides if your app will start or not.
Theres plenty of examples to use as a base for your application startup script. A simple example is (on 11.0);
/sbin/init.d/pwgr
Take a look at it. It sources a file called /etc/rc.config.d/pwgr which has a vairiable which declares wether to start pwgr or not. There is a stop and start section, you can edit this for your own application, and there are 2 symbolic links in /sbin/rc2.d to start it up when the system goes to runlevel 2, but no shutdown link (which would be something like K [for kill] XXX.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 08:14 AM
06-25-2001 08:14 AM
Re: start up scripts!!
1. cd /sbin/init.d
2. cp template yourscritpname
3. vi yourscript
I edit start_msg statment
II edit stop_msg statment
III edit start statment
a. change control_variable to yourvariable
b. add command to start you application
IV edit stop statment
a. mostly same as start statment
V vi /etc/rc.config.d/yourscript
add line "yourvariable=1"
VI ln -s /sbin/init.d/yourscript /sbin/rc3.d/S800yourscript (to start in runlevel 3)
VII ln -s /sbin/init.d/yourscript /sbin/rc2.d/K800yourscript (to kill your application in runlevel 2)
I hope this helps.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 08:20 AM
06-25-2001 08:20 AM
Re: start up scripts!!
I could go into detail, but would recommend looking at ITRC document id UNX1000486.
Hope this helps
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 08:26 AM
06-25-2001 08:26 AM
Re: start up scripts!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 08:35 AM
06-25-2001 08:35 AM
Re: start up scripts!!
What does 800, 200, 945 signify?? Does these nos dependent on the hardware or I simply use S800 to startup??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 08:56 AM
06-25-2001 08:56 AM
SolutionMark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 09:04 AM
06-25-2001 09:04 AM
Re: start up scripts!!
The 3-digit number is the sequence in which startup (or shutdown) scripts are exeucted (low-to-high). Startup scripts begin with an "S"; kill scripts begin with a "K". Startup scripts are exeucted when transiting from run-level N to N+1. Kill scripts execute when moving from level N to N-1.
A general rule is that the sum of the startup script's sequenece (3-digits) and the kill script's sequence equals 1000. Thus, a startup script coded at "S900" would have its kill counterpart specified as "K100".
The PDF-format white paper (below) is worth reading for all the details of this paradigm:
http://docs.hp.com/hpux/onlinedocs/os/startup.pdf
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2001 09:18 AM
06-25-2001 09:18 AM
Re: start up scripts!!
Points assigned to only 2 of 60 responses is really, really not good. Start assigning points to the people that take their time to help you or they will not want to help you anymore. Hope this helps.
Rob