Managing Serviceguard 11th Edition, Version A.11.16, Second Printing June 2004

Understanding Serviceguard Software Components
How Package Control Scripts Work
Chapter 388
At any step along the way, an error will result in the script exiting
abnormally (with an exit code of 1). For example, if a package service is
unable to be started, the control script will exit with an error.
Also, if the run script execution is not complete before the time specified
in the RUN_SCRIPT_TIMEOUT, the package manager will kill the script.
During run script execution, messages are written to a log file in the
same directory as the run script. This log has the same name as the run
script and the extension .log. Normal starts are recorded in the log,
together with error messages or warnings related to starting the
package.
NOTE After the package run script has finished its work, it exits, which means
that the script is no longer executing once the package is running
normally. After the script exits, the PIDs of the services started by the
script are monitored by the package manager directly. If the service dies,
the package manager will then run the package halt script or, if
SERVICE_FAILFAST_ENABLED is set to YES, it will halt the node on which
the package is running. If a number of Restarts is specified for a service
in the package control script, the service may be restarted if the restart
count allows it, without re-running the package run script.
Normal and Abnormal Exits from the Run Script
Exit codes on leaving the run script determine what happens to the
package next. A normal exit means the package startup was successful,
but all other exits mean that the start operation did not complete
successfully.
• 0—normal exit. The package started normally, so all services are up
on this node.
• 1—abnormal exit, also known as NO_RESTART exit. The package did
not complete all startup steps normally. Services are killed, and the
package is disabled from failing over to other nodes.
• 2—alternative exit, also known as RESTART exit. There was an error,
but the package is allowed to start up on another node. You might
use this kind of exit from a customer defined procedure if there was