home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume21 / rotate_log / patch02 next >
Encoding:
Text File  |  1991-08-09  |  6.7 KB  |  227 lines

  1. Newsgroups: comp.sources.misc
  2. From: Steve Simmons <scs@lokkur.dexter.mi.us>
  3. Subject:  REPOST: v21i095:  logfile management utility, Patch02
  4. Message-ID: <1991Aug9.194327.1008@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 662b0064f3e5ae15161f432dbb6932f7
  6. Date: Fri, 9 Aug 1991 19:43:27 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Steve Simmons <scs@lokkur.dexter.mi.us>
  10. Posting-number: Volume 21, Issue 95
  11. Archive-name: rotate_log/patch02
  12. Environment: UNIX
  13. Patch-To: rotate_log: Volume 17, Issue 77
  14.  
  15. [ Trouble with this getting out so lets try again... -Kent+ ]
  16.  
  17. This is patch 2 for rotate_log, the logfile management utility.  I am
  18. embarrassed to admit to three screwups.  First, in the initial release
  19. there was a bug when explicit change of mode, owner or group was made.
  20. Many kind folks noticed this and sent patches.  Second, in managing the
  21. various fixes and features sent in I somehow managed to apply and then
  22. unapply the fix for mode/owner/group.  Third, when a number of people
  23. noticed this problem after patch01, I stupidly assumed they were just
  24. using the wrong version and ignored them.  This persisted until I
  25. tried to use one of those features the other day.  To all you kind folks,
  26. my apologies.  This patch puts the fix back the way it ought to be.
  27.  
  28. The flub has left me with lingering doubts about the various fixes
  29. people sent me after the original posting.  If you are using a
  30. rotate_log which you've fixed, please do a diff and let me know if you
  31. see any odd stuff.
  32.  
  33. The initial posting of this package was to comp.sources.misc, volume
  34. 17, name rotate_log/part01.  The first patch (which you will need) was
  35. to volume 19, name rotate_log/patch01.
  36.  
  37. A condensed version of the ReadMe file follows, followed by patch02. 
  38.  
  39. --------------------------- blurb start -------------------------------
  40.  
  41. Tired of writing yet another log trimming sequence in yet another shell
  42. script?  Then this little ditty is for you.  It rotates logs, compresses
  43. them, cleans out the old logs, kills the oldest logs, lets you invoke
  44. custom commands along the way, complains politely if anything is wrong,
  45. and has a hot cup of coffee waiting for you in the morning.
  46.  
  47. OK, it won't do the coffee.  But it does everything else, and has
  48. managed to worm it's way into crontabs all over the joint.
  49.  
  50. Notes on first patch:
  51.  
  52. This patched several bugs in the initial (0.5) release.  Heiko Schlichting
  53. (heiko@methan.chemie.fu-berlin.de) sent some comments and fixes for the
  54. man page.  J. Fiander (david@scocan.sco.COM) sent suggested the "skip if
  55. empty" (-s) switch to not rotate empty logs.  That is implemented here.
  56.  
  57. Note on second patch:
  58.  
  59. This patch brings rotate_log to 0.8.  The man page remains at 1.4.  My
  60. previous fix to the parameterizing of chown/chmod/chgrp seems to have
  61. gotten lost somewhere; no other changes were made here.
  62.  
  63. --------------------------- patch start -------------------------------
  64.  
  65. *** ../patchlevel1/ReadMe    Fri Aug  2 19:38:42 1991
  66. --- ReadMe    Fri Aug  2 19:39:40 1991
  67. ***************
  68. *** 32,34 ****
  69. --- 32,40 ----
  70.   
  71.   Steve
  72.   April 27, 1991
  73. + Note on second patch:
  74. + This patch brings rotate_log to 0.8.  The man page remains at 1.4.
  75. + My previous fix to the parameterizing of chown/chmod/chgrp seems
  76. + to have gotten lost somewhere; no other changes were made here.
  77. *** ../patchlevel1/rotate_log    Fri Aug  2 19:38:42 1991
  78. --- rotate_log    Fri Aug  2 19:39:40 1991
  79. ***************
  80. *** 32,46 ****
  81.   #
  82.   # $Source: /home/lokkur/scs/src/rotate_log/rotate_log/RCS/rotate_log,v $
  83.   #
  84. ! # $Revision: 0.7 $
  85.   #
  86. ! # $Author: scs $    $Date: 91/04/30 22:10:10 $
  87.   #
  88.   # $State: Exp $    $Locker:  $
  89.   #
  90.   # $Log:    rotate_log,v $
  91.   # Revision 0.7  91/04/30  22:10:10  scs
  92. ! # Aded -s switch.
  93.   # 
  94.   # Revision 0.6  91/04/27  16:16:59  scs
  95.   # Fixed bug with -b/-n combo losing arguements.  Patch supplied by
  96. --- 32,50 ----
  97.   #
  98.   # $Source: /home/lokkur/scs/src/rotate_log/rotate_log/RCS/rotate_log,v $
  99.   #
  100. ! # $Revision: 0.8 $
  101.   #
  102. ! # $Author: scs $    $Date: 91/08/02 19:01:20 $
  103.   #
  104.   # $State: Exp $    $Locker:  $
  105.   #
  106.   # $Log:    rotate_log,v $
  107. + # Revision 0.8  91/08/02  19:01:20  scs
  108. + # Corrected error in paraterization of chmod/chgrp/chown.  Didn't
  109. + # this get fixed once before?
  110. + # 
  111.   # Revision 0.7  91/04/30  22:10:10  scs
  112. ! # Added -s switch.
  113.   # 
  114.   # Revision 0.6  91/04/27  16:16:59  scs
  115.   # Fixed bug with -b/-n combo losing arguements.  Patch supplied by
  116. ***************
  117. *** 137,143 ****
  118.               echo "${SCRIPT}: The $1 switch requires a permissions mode.  Aborting."
  119.               exit 0
  120.           fi
  121. !         SOURCE_MODE="$CHMOD $2"
  122.           shift
  123.           ;;
  124.       -M )    if [ "$2" = "" ] ; then
  125. --- 141,147 ----
  126.               echo "${SCRIPT}: The $1 switch requires a permissions mode.  Aborting."
  127.               exit 0
  128.           fi
  129. !         SOURCE_MODE="$2"
  130.           shift
  131.           ;;
  132.       -M )    if [ "$2" = "" ] ; then
  133. ***************
  134. *** 144,150 ****
  135.               echo "${SCRIPT}: The $1 switch requires a permissions mode.  Aborting."
  136.               exit 0
  137.           fi
  138. !         BACKUP_MODE="$CHMOD $2"
  139.           shift
  140.           ;;
  141.       -o )    if [ "$2" = "" ] ; then
  142. --- 148,154 ----
  143.               echo "${SCRIPT}: The $1 switch requires a permissions mode.  Aborting."
  144.               exit 0
  145.           fi
  146. !         BACKUP_MODE="$2"
  147.           shift
  148.           ;;
  149.       -o )    if [ "$2" = "" ] ; then
  150. ***************
  151. *** 155,161 ****
  152.               echo "${SCRIPT}: No such login id as $2.  Aborting."
  153.               exit 0
  154.           fi
  155. !         SOURCE_OWNER="$CHOWN $2"
  156.           shift
  157.           ;;
  158.       -O )    if [ "$2" = "" ] ; then
  159. --- 159,165 ----
  160.               echo "${SCRIPT}: No such login id as $2.  Aborting."
  161.               exit 0
  162.           fi
  163. !         SOURCE_OWNER="$2"
  164.           shift
  165.           ;;
  166.       -O )    if [ "$2" = "" ] ; then
  167. ***************
  168. *** 166,172 ****
  169.               echo "${SCRIPT}: No such login id as $2.  Aborting."
  170.               exit 0
  171.           fi
  172. !         BACKUP_OWNER="$CHOWN $2"
  173.           shift
  174.           ;;
  175.       -g )    if [ "$2" = "" ] ; then
  176. --- 170,176 ----
  177.               echo "${SCRIPT}: No such login id as $2.  Aborting."
  178.               exit 0
  179.           fi
  180. !         BACKUP_OWNER="$2"
  181.           shift
  182.           ;;
  183.       -g )    if [ "$2" = "" ] ; then
  184. ***************
  185. *** 177,183 ****
  186.               echo "${SCRIPT}: No such group as $2.  Aborting."
  187.               exit 0
  188.           fi
  189. !         SOURCE_GROUP="$CHGRP $2"
  190.           shift
  191.           ;;
  192.       -G )    if [ "$2" = "" ] ; then
  193. --- 181,187 ----
  194.               echo "${SCRIPT}: No such group as $2.  Aborting."
  195.               exit 0
  196.           fi
  197. !         SOURCE_GROUP="$2"
  198.           shift
  199.           ;;
  200.       -G )    if [ "$2" = "" ] ; then
  201. ***************
  202. *** 188,194 ****
  203.               echo "${SCRIPT}: No such group as $2.  Aborting."
  204.               exit 0
  205.           fi
  206. !         BACKUP_GROUP="$CHGRP $2"
  207.           shift
  208.           ;;
  209.       -e )    if [ "$2" = "" ] ; then
  210. --- 192,198 ----
  211.               echo "${SCRIPT}: No such group as $2.  Aborting."
  212.               exit 0
  213.           fi
  214. !         BACKUP_GROUP="$2"
  215.           shift
  216.           ;;
  217.       -e )    if [ "$2" = "" ] ; then
  218.  
  219. exit 0 # Just in case...
  220. -- 
  221. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  222. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  223. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  224. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  225.