Software Distributor Administration Guide (March 2009)

Table Of Contents
1. Never emit blank lines.
2. All output lines must have one of these forms:
ERROR: text
WARNING: text
NOTE: text
<blank> text
In each case, the keyword, if there is one, must begin in column 1, and the
text must begin in column 10 (indented nine blanks).
3. Choose the keyword (ERROR, WARNING, NOTE, or blank) as follows:
ERROR: Cannot proceed, may need corrective action.
WARNING: Can proceed, but something went wrong and may need action.
NOTE: Can proceed, but something happened that is out of the ordinary
or worth special attention. (Not just a status message.)
<blank> Generic progress and status messages (keep them to a necessary
minimum).
Do not start a line with an asterisk (*) character. This is reserved for operational
messages printed by the agent so you can easily distinguish them from other
messages.
4. If the message text requires more than a single 72-character line, break it into
several 72-character lines. Indent all lines after the first. For example:
NOTE: To install your new graphics package, you must turn on the lights
in the next room.Please turn them off when you leave.
5. Do not use tab characters in any messages.
Scripts execute other commands which may unexpectedly fail and emit output
not in the above format. Wherever you suspect a failure is possible or likely (and
it is reasonable to do so) redirect the standard output or error of the executed
command to /dev/null or to a temporary file. Then emit a proper-format message
based on the return code or on output from the command. For example:
/bin/grep bletch /etc/bagel 2c&>/dev/null
if[$?=1]
then
echo ERROR: Cannot find bletch in /etc/bagel. |&>2
fi
Follow these conventions to ensure a control script’s messages have a similar look
and feel to the messages generated by the agent (and the commands themselves).
Use full sentences wherever possible. Avoid terseness.
Start sentences and phrases with capital letter and end with period.
Put two blanks after period; one after colons, semicolons, and commas.
286 Using Control Scripts