OSSP CVS Repository

ossp - Check-in [6017]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 6017
Date: 2008-Sep-21 17:01:15 (local)
2008-Sep-21 15:01:15 (UTC)
User:rse
Branch:
Comment: Provide SHTOOL_ROTATE_LOGFILE environment variable to "shtool rotate" prolog/epilog commands.

Submitted by: Bill Campbell <bill@celestial.com>

Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.241 -> 1.242     6 inserted, 0 deleted
ossp-pkg/shtool/sh.rotate      1.14 -> 1.15     10 inserted, 0 deleted

ossp-pkg/shtool/ChangeLog 1.241 -> 1.242

--- ChangeLog    2008/07/18 08:04:32     1.241
+++ ChangeLog    2008/09/21 15:01:15     1.242
@@ -9,6 +9,12 @@
 
  ChangeLog
 
+ Changes between 2.0.8 and 2.0.9 (18-Jul-2008 to xx-XXX-2008):
+
+   *) Provide SHTOOL_ROTATE_LOGFILE environment variable
+      to "shtool rotate" prolog/epilog commands.
+      [Bill Campbell <bill@celestial.com>]
+
  Changes between 2.0.7 and 2.0.8 (19-May-2007 to 18-Jul-2008):
 
    *) Upgrade build environment to GNU autoconf 2.62


ossp-pkg/shtool/sh.rotate 1.14 -> 1.15

--- sh.rotate    2008/04/02 20:13:44     1.14
+++ sh.rotate    2008/09/21 15:01:15     1.15
@@ -202,6 +202,11 @@
 
     #   execute prolog
     if [ ".$opt_P" != . ]; then
+        #   pass current log file name to prolog
+        #   prolog cannot be handed an argument as it may be
+        #   called as "prolog && something"  
+        SHTOOL_ROTATE_LOGFILE="$ldir/$file"
+        export SHTOOL_ROTATE_LOGFILE
         if [ ".$opt_t" = .yes ]; then
             echo "$opt_P"
         fi
@@ -391,6 +396,11 @@
 
     #   execute epilog
     if [ ".$opt_E" != . ]; then
+        #   pass archive file name to epilog command
+        #   epilog cannot be handed an argument as it is often
+        #   called as "epilog && something"
+        SHTOOL_ROTATE_LOGFILE="${adir}/${file}.${n}"
+        export SHTOOL_ROTATE_LOGFILE
         if [ ".$opt_t" = .yes ]; then
             echo "$opt_E"
         fi

CVSTrac 2.0.1