OSSP CVS Repository

ossp - Difference in ossp-pkg/shtool/sh.rotate versions 1.14 and 1.15
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

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