HP-UX System Administrator's Guide: Routine Management Tasks HP-UX 11i v3 (B3921-90023, September 2010)
NOTE: Setting the start-up variable (WEB_PRODUCTNAME in this case) to 0, rather
than deleting the script, is the way to remove a subsystem from the start-up
sequence. This is particularly important in the case of HP and third-party scripts;
do not edit them, delete them or move them; simply change the variable in the
appropriate script under /etc/rc.config.d/ to 0 if you don’t want the
corresponding start-up script to run.
3. Create symbolic links that cause the script to be run at the right place in the boot
and shutdown sequences.
Since HP guarantees that scripts using the number 900 in run level 2 will not be
overwritten when we upgrade the system or add HP or third-party software, and
run level 2 is a good place to start the web_productnamedaemon, we assigned
our script number 900 and linked it into the /sbin/rc2.ddirectory:
ln -s /sbin/init.d/web_productname /sbin/rc2.d/S900web_productname
The S indicates “start” and the 900 determines starting order within the run level,
so our script starts late (currently last) in run level 2.
Similarly, HP guarantees scripts using the number 100 in run level 1 will not be
overwritten, so we also assigned our script the number 100 and linked it into the
/sbin/rc1.d directory, this time with a K (for “kill”) code letter:
ln -s /sbin/init.d/web_productname /sbin/rc1.d/K100web_productname
This means that the web_productname daemon is stopped after most other
functions in run level 1 as the system shuts down.
4. Test the script itself, and test that it works correctly in the start-up and shutdown
processes.
Run /sbin/init.d/web_productname several times “by hand” to debug it,
then install it (as described in step 3 above) on a test system which you rebooted
to test that the daemon was started and stopped correctly, then finally install it on
the production system and reboot that system.
Shutting Down Systems
• “Types of Shutdown” (page 83)
— “Normal (Planned) Shutdown” (page 83)
— “Power Failure” (page 86)
— “Unclean Shutdowns” (page 87)
— “System Crashes / HP-UX Panics” (page 88)
• “Special Considerations for Shutting Down Certain Systems” (page 88)
— “Mail Server” (page 88)
— “Name Server” (page 89)
82 Booting and Shutdown