X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fexicyclog.src;h=754c9edb8a9b498f2e87db560edc58b388a1e26b;hb=f8a9072f30574d6f467685a008458b409ade30d0;hp=c491b205b6f7cadaa86fabaf93b32966ad5cbf9b;hpb=468c0c7e3066886ff5028bb423b96712a155fe05;p=exim.git diff --git a/src/src/exicyclog.src b/src/src/exicyclog.src index c491b205b..754c9edb8 100644 --- a/src/src/exicyclog.src +++ b/src/src/exicyclog.src @@ -72,6 +72,11 @@ while [ $# -gt 0 ] ; do -k) keep=$2 shift ;; + --version) + echo "`basename $0`: $0" + echo "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION" + exit 0 + ;; *) echo "** exicyclog: unknown option $1" exit 1 ;; @@ -144,7 +149,7 @@ done st=' ' exim_path=`grep "^[$st]*exim_path" $config | sed "s/.*=[$st]*//"` -if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim; fi +if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim4; fi spool_directory=`$exim_path -C $config -bP spool_directory | sed 's/.*=[ ]*//'` @@ -232,16 +237,16 @@ $b # Now do the job. First remove the files that have "fallen off the bottom". # Look for both the compressed and uncompressed forms. -if [ $keep -lt 10 ]; then keept=0$keep; else keept=$keep; fi; +if [ $keep -lt 10 ]; then rotation=0$keep; else rotation=$keep; fi; -if [ -f $mainlog.$keept ]; then $rm $mainlog.$keept; fi; -if [ -f $mainlog.$keept.$suffix ]; then $rm $mainlog.$keept.$suffix; fi; +if [ -f $mainlog.$rotation ]; then $rm $mainlog.$rotation; fi; +if [ -f $mainlog.$rotation.$suffix ]; then $rm $mainlog.$rotation.$suffix; fi; -if [ -f $rejectlog.$keept ]; then $rm $rejectlog.$keept; fi; -if [ -f $rejectlog.$keept.$suffix ]; then $rm $rejectlog.$keept.$suffix; fi; +if [ -f $rejectlog.$rotation ]; then $rm $rejectlog.$rotation; fi; +if [ -f $rejectlog.$rotation.$suffix ]; then $rm $rejectlog.$rotation.$suffix; fi; -if [ -f $paniclog.$keept ]; then $rm $paniclog.$keept; fi; -if [ -f $paniclog.$keept.$suffix ]; then $rm $paniclog.$keept.$suffix; fi; +if [ -f $paniclog.$rotation ]; then $rm $paniclog.$rotation; fi; +if [ -f $paniclog.$rotation.$suffix ]; then $rm $paniclog.$rotation.$suffix; fi; # Now rename all the previous old files by increasing their numbers by 1. # When the number is less than 10, insert a leading zero.