Annotation of coherent/g/usr/lib/uucp/uumvlog, revision 1.1.1.1

1.1       root        1: : /usr/lib/uucp/uumvlog 6/05/91
                      2: : Usage: uumvlog days_to_keep
                      3: : ${1?Please use uumvlog days_to_keep}
                      4: tmp=/tmp/uulogclean.tmp
                      5: date >$tmp
                      6: echo Moving old uucp log files >>$tmp
                      7: for dir in uucico uux uuxqt uucp; do
                      8:        for site in `uuname` `echo $dir | tr a-z A-Z`; do
                      9:                file=/usr/spool/uucp/.Log/$dir/$site
                     10:                if [ $1 -ge 2 ] ; then
                     11:                        for days in `from $1 to 2 by -1`; do
                     12:                                new=`expr $days - 1`
                     13:                                if [ -f $file.$new ] ; then
                     14:                                        echo moving $file.$new to $file.$days >>$tmp
                     15:                                        mv $file.$new $file.$days >>$tmp 2>&1
                     16:                                fi
                     17:                        done
                     18:                fi
                     19:                if [ -f $file ] ; then
                     20:                        echo moving $file to $file.1 >>$tmp
                     21:                        mv $file $file.1 >>$tmp 2>&1
                     22:                        >$file
                     23:                fi
                     24:        done
                     25: done
                     26: 
                     27: 
                     28: # move the uucp transfer stats and uucico debug files
                     29: 
                     30:        for site in xferstats audit.local ; do
                     31:                file=/usr/spool/uucp/.Admin/$site
                     32:                if [ $1 -ge 2 ] ; then
                     33:                        for days in `from $1 to 2 by -1`; do
                     34:                                new=`expr $days - 1`
                     35:                                if [ -f $file.$new ] ; then
                     36:                                        echo moving $file.$new to $file.$days >>$tmp
                     37:                                        mv $file.$new $file.$days >>$tmp 2>&1
                     38:                                fi
                     39:                        done
                     40:                fi
                     41:                if [ -f $file ] ; then
                     42:                        echo moving $file to $file.1 >>$tmp
                     43:                        mv $file $file.1 >>$tmp 2>&1
                     44:                        >$file
                     45:                fi
                     46:        done
                     47: 
                     48: # move the mail logs
                     49: 
                     50:        for site in lmail mail ; do
                     51:                file=/usr/spool/uucp/.Log/mail/$site
                     52:                if [ $1 -ge 2 ] ; then
                     53:                        for days in `from $1 to 2 by -1`; do
                     54:                                new=`expr $days - 1`
                     55:                                if [ -f $file.$new ] ; then
                     56:                                        echo moving $file.$new to $file.$days >>$tmp
                     57:                                        mv $file.$new $file.$days >>$tmp 2>&1
                     58:                                fi
                     59:                        done
                     60:                fi
                     61:                if [ -f $file ] ; then
                     62:                        echo moving $file to $file.1 >>$tmp
                     63:                        mv $file $file.1 >>$tmp 2>&1
                     64:                        >$file
                     65:                fi
                     66:        done
                     67: 
                     68: 
                     69: cat $tmp
                     70: rm $tmp
                     71: exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.