home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: Steve Simmons <scs@lokkur.dexter.mi.us>
- Subject: REPOST: v21i095: logfile management utility, Patch02
- Message-ID: <1991Aug9.194327.1008@sparky.IMD.Sterling.COM>
- X-Md4-Signature: 662b0064f3e5ae15161f432dbb6932f7
- Date: Fri, 9 Aug 1991 19:43:27 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: Steve Simmons <scs@lokkur.dexter.mi.us>
- Posting-number: Volume 21, Issue 95
- Archive-name: rotate_log/patch02
- Environment: UNIX
- Patch-To: rotate_log: Volume 17, Issue 77
-
- [ Trouble with this getting out so lets try again... -Kent+ ]
-
- This is patch 2 for rotate_log, the logfile management utility. I am
- embarrassed to admit to three screwups. First, in the initial release
- there was a bug when explicit change of mode, owner or group was made.
- Many kind folks noticed this and sent patches. Second, in managing the
- various fixes and features sent in I somehow managed to apply and then
- unapply the fix for mode/owner/group. Third, when a number of people
- noticed this problem after patch01, I stupidly assumed they were just
- using the wrong version and ignored them. This persisted until I
- tried to use one of those features the other day. To all you kind folks,
- my apologies. This patch puts the fix back the way it ought to be.
-
- The flub has left me with lingering doubts about the various fixes
- people sent me after the original posting. If you are using a
- rotate_log which you've fixed, please do a diff and let me know if you
- see any odd stuff.
-
- The initial posting of this package was to comp.sources.misc, volume
- 17, name rotate_log/part01. The first patch (which you will need) was
- to volume 19, name rotate_log/patch01.
-
- A condensed version of the ReadMe file follows, followed by patch02.
-
- --------------------------- blurb start -------------------------------
-
- Tired of writing yet another log trimming sequence in yet another shell
- script? Then this little ditty is for you. It rotates logs, compresses
- them, cleans out the old logs, kills the oldest logs, lets you invoke
- custom commands along the way, complains politely if anything is wrong,
- and has a hot cup of coffee waiting for you in the morning.
-
- OK, it won't do the coffee. But it does everything else, and has
- managed to worm it's way into crontabs all over the joint.
-
- Notes on first patch:
-
- This patched several bugs in the initial (0.5) release. Heiko Schlichting
- (heiko@methan.chemie.fu-berlin.de) sent some comments and fixes for the
- man page. J. Fiander (david@scocan.sco.COM) sent suggested the "skip if
- empty" (-s) switch to not rotate empty logs. That is implemented here.
-
- Note on second patch:
-
- This patch brings rotate_log to 0.8. The man page remains at 1.4. My
- previous fix to the parameterizing of chown/chmod/chgrp seems to have
- gotten lost somewhere; no other changes were made here.
-
- --------------------------- patch start -------------------------------
-
- *** ../patchlevel1/ReadMe Fri Aug 2 19:38:42 1991
- --- ReadMe Fri Aug 2 19:39:40 1991
- ***************
- *** 32,34 ****
- --- 32,40 ----
-
- Steve
- April 27, 1991
- +
- + Note on second patch:
- +
- + This patch brings rotate_log to 0.8. The man page remains at 1.4.
- + My previous fix to the parameterizing of chown/chmod/chgrp seems
- + to have gotten lost somewhere; no other changes were made here.
- *** ../patchlevel1/rotate_log Fri Aug 2 19:38:42 1991
- --- rotate_log Fri Aug 2 19:39:40 1991
- ***************
- *** 32,46 ****
- #
- # $Source: /home/lokkur/scs/src/rotate_log/rotate_log/RCS/rotate_log,v $
- #
- ! # $Revision: 0.7 $
- #
- ! # $Author: scs $ $Date: 91/04/30 22:10:10 $
- #
- # $State: Exp $ $Locker: $
- #
- # $Log: rotate_log,v $
- # Revision 0.7 91/04/30 22:10:10 scs
- ! # Aded -s switch.
- #
- # Revision 0.6 91/04/27 16:16:59 scs
- # Fixed bug with -b/-n combo losing arguements. Patch supplied by
- --- 32,50 ----
- #
- # $Source: /home/lokkur/scs/src/rotate_log/rotate_log/RCS/rotate_log,v $
- #
- ! # $Revision: 0.8 $
- #
- ! # $Author: scs $ $Date: 91/08/02 19:01:20 $
- #
- # $State: Exp $ $Locker: $
- #
- # $Log: rotate_log,v $
- + # Revision 0.8 91/08/02 19:01:20 scs
- + # Corrected error in paraterization of chmod/chgrp/chown. Didn't
- + # this get fixed once before?
- + #
- # Revision 0.7 91/04/30 22:10:10 scs
- ! # Added -s switch.
- #
- # Revision 0.6 91/04/27 16:16:59 scs
- # Fixed bug with -b/-n combo losing arguements. Patch supplied by
- ***************
- *** 137,143 ****
- echo "${SCRIPT}: The $1 switch requires a permissions mode. Aborting."
- exit 0
- fi
- ! SOURCE_MODE="$CHMOD $2"
- shift
- ;;
- -M ) if [ "$2" = "" ] ; then
- --- 141,147 ----
- echo "${SCRIPT}: The $1 switch requires a permissions mode. Aborting."
- exit 0
- fi
- ! SOURCE_MODE="$2"
- shift
- ;;
- -M ) if [ "$2" = "" ] ; then
- ***************
- *** 144,150 ****
- echo "${SCRIPT}: The $1 switch requires a permissions mode. Aborting."
- exit 0
- fi
- ! BACKUP_MODE="$CHMOD $2"
- shift
- ;;
- -o ) if [ "$2" = "" ] ; then
- --- 148,154 ----
- echo "${SCRIPT}: The $1 switch requires a permissions mode. Aborting."
- exit 0
- fi
- ! BACKUP_MODE="$2"
- shift
- ;;
- -o ) if [ "$2" = "" ] ; then
- ***************
- *** 155,161 ****
- echo "${SCRIPT}: No such login id as $2. Aborting."
- exit 0
- fi
- ! SOURCE_OWNER="$CHOWN $2"
- shift
- ;;
- -O ) if [ "$2" = "" ] ; then
- --- 159,165 ----
- echo "${SCRIPT}: No such login id as $2. Aborting."
- exit 0
- fi
- ! SOURCE_OWNER="$2"
- shift
- ;;
- -O ) if [ "$2" = "" ] ; then
- ***************
- *** 166,172 ****
- echo "${SCRIPT}: No such login id as $2. Aborting."
- exit 0
- fi
- ! BACKUP_OWNER="$CHOWN $2"
- shift
- ;;
- -g ) if [ "$2" = "" ] ; then
- --- 170,176 ----
- echo "${SCRIPT}: No such login id as $2. Aborting."
- exit 0
- fi
- ! BACKUP_OWNER="$2"
- shift
- ;;
- -g ) if [ "$2" = "" ] ; then
- ***************
- *** 177,183 ****
- echo "${SCRIPT}: No such group as $2. Aborting."
- exit 0
- fi
- ! SOURCE_GROUP="$CHGRP $2"
- shift
- ;;
- -G ) if [ "$2" = "" ] ; then
- --- 181,187 ----
- echo "${SCRIPT}: No such group as $2. Aborting."
- exit 0
- fi
- ! SOURCE_GROUP="$2"
- shift
- ;;
- -G ) if [ "$2" = "" ] ; then
- ***************
- *** 188,194 ****
- echo "${SCRIPT}: No such group as $2. Aborting."
- exit 0
- fi
- ! BACKUP_GROUP="$CHGRP $2"
- shift
- ;;
- -e ) if [ "$2" = "" ] ; then
- --- 192,198 ----
- echo "${SCRIPT}: No such group as $2. Aborting."
- exit 0
- fi
- ! BACKUP_GROUP="$2"
- shift
- ;;
- -e ) if [ "$2" = "" ] ; then
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-