HP-UX HB v13.00 Ch-03 - System Startup
HP-UX Handbook – Rev 13.00 Page 8 (of 14)
Chapter 03 System Startup
October 29, 2013
Script Output
To ensure proper reporting of startup events, startup scripts are required to comply with the
following guidelines for script output.
Status messages, such as “starting house daemon” must be directed to stdout. All error
messages must be directed to stderr.
Script output, both stdout and stderr, is redirected to log file /etc/rc.log, unless the
startup checklist mode is set to the raw mode. In this case, all output goes to the console.
All error messages should be echoed to stdout or stderr.
Startup scripts are not allowed to send messages directly to the console, or to start any
daemons that immediately write to the console. This restriction exists because these scripts
are now started by the /sbin/rc checklist wrapper. All script output should go to either
stdout or stderr, and thus be captured in a log file. Any console output will be garbled.
Return Values
The return values for Execution scripts are as follows:
0 Script exited without error. This causes the status OK to appear in the checklist.
1 Script encountered errors. This causes the status FAIL to appear in the checklist.
2 Script was skipped due to overriding control variables from /etc/rc.config.d files, or for
other reasons, and did not actually do anything. This causes the status N/A to appear in
the checklist.
3 Script executed normally and requires an immediate system reboot for the changes to
take effect (NOTE: Reserved for key system components).
4 Script exited without error and started a process in background mode.
>4 For return values greater than 4 the action is same as return value 1, script encountered
errors.
NOTE: These are the only exit values acceptable. Returning an arbitrary non-zero exit value
from a command to indicate failure may cause the script to appear to have been skipped in the
checklist, or may cause the system to reboot!