On Fri, Sep 19, 2008, Bill Campbell wrote: > The attached patch to the sh.rotate script sets an environment > variable ROTATE_LOGFILE with the name of the current file being > processed before invoking the epilog or prolog programs. This > permits the epilog/prolog script to do things such as calling > webalizer to process the file being rotated. > > The problem is that defining multiple log files in the rc.conf > file with lines like the follow cause the epilog/prolog programs > to be execute multiple times without knowledge of which file is > being processed. > > apache_log_files="/opkg/var/apache/log/*access*log" > > I first tried having the sh.rotate script add an argument to the > eval of the epilog/prolog command, but this does not work when > the command is compound as in the rc.apache daily processing: > > -E "${apache_log_epilog} && rc apache reload" > > Creating a new environment variable avoids this problem and > cannot break any existing epilog/prolog programs as they will not > be aware of the variable.
Ok, taken over into my GNU shtool source tree for inclusion into GNU shtool 2.0.9 -- with just a small adjustment: ROTATE_LOGFILE -> SHTOOL_ROTATE_LOGFILE to avoid any conflicts. Thanks for your contribution, Bill! Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ OpenPKG http://openpkg.org Developer Communication List openpkg-dev@openpkg.org