aboutsummaryrefslogtreecommitdiff
path: root/etc/periodic/monthly/200.accounting
diff options
context:
space:
mode:
authorBrad Davis <brd@FreeBSD.org>2018-08-11 17:11:08 +0000
committerBrad Davis <brd@FreeBSD.org>2018-08-11 17:11:08 +0000
commit81ea85a8845662ca329a954eeeb3e6d4124282a2 (patch)
tree81facbf2cdb27b51b13a66529c126761179d0f63 /etc/periodic/monthly/200.accounting
parent9317ba22260d45a8bf70b0490fa0191b51d858bb (diff)
downloadsrc-81ea85a8845662ca329a954eeeb3e6d4124282a2.tar.gz
src-81ea85a8845662ca329a954eeeb3e6d4124282a2.zip
Move all periodic related config and scripts to usr.sbin/periodic/
This makes pkgbase easier by tagging these as CONFS so they are properly tagged as config files. Approved by: will (mentor) Sponsored by: Essen Hackathon Differential Revision: https://reviews.freebsd.org/D16553
Notes
Notes: svn path=/head/; revision=337648
Diffstat (limited to 'etc/periodic/monthly/200.accounting')
-rwxr-xr-xetc/periodic/monthly/200.accounting51
1 files changed, 0 insertions, 51 deletions
diff --git a/etc/periodic/monthly/200.accounting b/etc/periodic/monthly/200.accounting
deleted file mode 100755
index 46f153de535a..000000000000
--- a/etc/periodic/monthly/200.accounting
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh -
-#
-# $FreeBSD$
-#
-
-# If there is a global system configuration file, suck it in.
-#
-if [ -r /etc/defaults/periodic.conf ]
-then
- . /etc/defaults/periodic.conf
- source_periodic_confs
-fi
-
-oldmask=$(umask)
-umask 066
-case "$monthly_accounting_enable" in
- [Yy][Ee][Ss])
- W=/var/log/utx.log
- rc=0
- remove=NO
- if [ ! -f $W.0 ]
- then
- if [ -f $W.0.gz ]
- then
- remove=YES
- zcat $W.0.gz > $W.0 || rc=1
- elif [ -f $W.0.bz2 ]
- then
- remove=YES
- bzcat $W.0.bz2 > $W.0 || rc=1
- else
- echo '$monthly_accounting_enable is set but' \
- "$W.0 doesn't exist"
- rc=2
- fi
- fi
- if [ $rc -eq 0 ]
- then
- echo ""
- echo "Doing login accounting:"
-
- rc=$(ac -p -w $W.0 | sort -nr -k 2 | tee /dev/stderr | wc -l)
- [ $rc -gt 0 ] && rc=1
- fi
- [ $remove = YES ] && rm -f $W.0;;
-
- *) rc=0;;
-esac
-
-umask $oldmask
-exit $rc