We have tweaked the main periodic script so that it only sends mail upon the detection of an error condition. Error conditions are generally defined by the subscript placing the string **ERROR** in its output. Additionally we check for writes to stderr and the return code of the subscripts. The latest update to the periodic subscripts utilize an case command to determine if they are to be executed or not. Unfortunatley there is only one pattern given. When the case command is unable to match any pattern it sets a return code of 1. As this is the last command executed in the subscript this return code is sent back to the periodic script Fix: The following can be used to patch the daily scripts with a default pattern: How-To-Repeat: Modify periodic (in /usr/sbin) to report the subscript and its return code. Notice that 'disabled' subscript have a return code of 1 and 'enabled' subscripts have a return code of 0.
Responsible Changed From-To: freebsd-bugs->brian I'll deal with this. I'm going to take this a bit further - an exit of 0 means everything's ok and nothing of note needs to be reported. An exit of 1 means something of interest happened. An exit of >1 means that an error occurred. Periodic(8) will be able to either mail or log it's output and can be told to report everything, everything of interest or errors only.
State Changed From-To: open->closed All periodic scripts now have specific return code requirements in -current