- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Regarding 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
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
08-03-2006 07:58 AM
08-03-2006 07:58 AM
2. Also if i want to put a shell script to get started when system is started and stop the shell script when system is shutdown. How do i do it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 08:06 AM
08-03-2006 08:06 AM
SolutionIn the /sbin/rc#.d directories, the files starting with S are started when init climbs to that runlevel, and the ones starting with K are stopped when init descends to that runlevel.
/etc/rc.config.d holds scripts that (properly written) scripts in /sbin/init.d check to make sure they should be starting the process in question.
Here's a document containing further information on startup scripts (courtesy of James R. Ferguson from another, similar thread):
http://docs.hp.com/en/934/startup.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 08:08 AM
08-03-2006 08:08 AM
Re: Regarding scripts
The purpose of the two directories is radically different.
/etc/rc.config.d is not really scripting though functions and subroutines can be set up. It is basically a repository for parameters. You set a variable in mailsvrs to 1 and sendmail will start, you don't it does not.
/sbin/init.d is where startup scripts reside. They start services and very often read the other directtory but this is not mandatory.
sendmail startup reads whether to start or not from the aforementioned configuration file.
Other scripts merely execute in /sbin/init.d
An important convention for this directory is the script has a start and stop function and accepts a single parameter on startup.
Scripts here get that either from command input or from soft links in the various /sbin/rc#.d directories.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 09:17 AM
08-03-2006 09:17 AM
Re: Regarding scripts
For an in-depth, but quick, understanding of the HP-UX startup/shutdown model, read the whitepaper that Johnathan listed, above.
The material is applicable to all HP-UX releases from 10.x thru 11i.
An additional resource is the manpages for 'rc(1M)':
http://www.docs.hp.com/en/B2355-60127/rc.1M.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 06:17 PM
08-03-2006 06:17 PM
Re: Regarding scripts
# man rc
# man rc.config
# man init
rgs,
ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2006 07:41 PM
09-06-2006 07:41 PM