- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Unix system Startup & Kill run level 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
02-17-2004 06:30 AM
02-17-2004 06:30 AM
In one of my HP-UX server, i observed that there are some Killing scripts missing for Starting scripts...Is this abnormal ?
Apart from the Startup & Kill naming convention (for ex: S & K ), is there will be any difference between Startup script & Kill script ( the shell script inside the file ) ?
Please give me some valuable info on this.
Regards,
Phani
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 06:36 AM
02-17-2004 06:36 AM
Re: Unix system Startup & Kill run level scripts
this happens, I usually rename or remove starup scripts for services not required as part of the hardening process. S and K are naming conventions what is is in the script will happen regardless of the name and of course it only happens when the script is called by the correct name.
:-) john.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 06:38 AM
02-17-2004 06:38 AM
SolutionOpen up one of the scripts and take a look at it and you'll see what I mean.
When HP-UX starts up, or shuts down / reboots, the init command parses through the scripts in each /sbin/rc?.d run level directory. If it is starting up each script gets executed with a 'start' as the parameter for the script (/sbin/rc2.d/S500inetd start to start the inetd daemon). When the system is shuttind down, the same script gets called, except there is a 'stop' argument (/sbin/rc1.d/K500inetd stop to stop the inetd daemon).
Now it is possible for some third party products, or home grown applications, that you may have a start script and not a kill script. If you don't care the the process for an application just gets killed when the machine shuts down, then you may not have put one in. It is not adviseable, but is possible. I generally like to keep the S and K scripts in sync as it makes things easier to manage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 06:39 AM
02-17-2004 06:39 AM
Re: Unix system Startup & Kill run level scripts
The convention (and its nothing more than that) is that id the startup script is named SnnnXXX and the kill script is named KNNNXXX then nnn + NNN should equal 1000. This tends to correctly order the startup and shutdown. Also both the startup and kill scripts should be symbolic links to the actual script in /sbin/init.d.
The same script is almost always used for both startup and kill and the difference in behavior is controlled inside a case statement depneding upon whether a 'stop', 'start', 'start_msg', or 'stop_msg' argument was supplied to the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 06:41 AM
02-17-2004 06:41 AM
Re: Unix system Startup & Kill run level scripts
To answer your question about the difference between startup and kill scripts: there is no difference. If you look closely, you will see that they are merely links to a /sbin/init.d/ script. During startup, all the rc?.d directories are parsed and all the S* scripts invoke their corresponding /sbin/init.d script with a "start" argument. During shutdown, the reverse is true. All the K* scripts invoke the corresponding /sbin/init.d script with a "stop" argument. Any difference comes from the way the /sbin/init.d script handles the two arguments.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 06:51 AM
02-17-2004 06:51 AM
Re: Unix system Startup & Kill run level scripts
Great explaination..Very much clear :)
Thanks alot for your information.
Thanks,
Regards,
Phani