aboutsummaryrefslogtreecommitdiff
path: root/etc/periodic/monthly
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-06-23 01:18:31 +0000
committerBrian Somers <brian@FreeBSD.org>2000-06-23 01:18:31 +0000
commitf3e285ba7d9ba652ea61d3aca42e6b649ae9e981 (patch)
tree1d45e43f3d06b437f0125de60d0841c0cd040b70 /etc/periodic/monthly
parent32ee60d7b865fd8b10a81a24f1a570261af2562a (diff)
downloadsrc-f3e285ba7d9ba652ea61d3aca42e6b649ae9e981.tar.gz
src-f3e285ba7d9ba652ea61d3aca42e6b649ae9e981.zip
Introduce /etc/defaults/periodic.conf, similar in concept to rc.conf.
The only change in the default functionality should be that the output reports are slightly more verbose WRT files deleted. Not objected to by: freebsd-arch
Notes
Notes: svn path=/head/; revision=61981
Diffstat (limited to 'etc/periodic/monthly')
-rwxr-xr-xetc/periodic/monthly/200.accounting25
-rwxr-xr-xetc/periodic/monthly/999.local24
2 files changed, 39 insertions, 10 deletions
diff --git a/etc/periodic/monthly/200.accounting b/etc/periodic/monthly/200.accounting
index fff47bfbfc83..5444ea860bba 100755
--- a/etc/periodic/monthly/200.accounting
+++ b/etc/periodic/monthly/200.accounting
@@ -3,12 +3,25 @@
# $FreeBSD$
#
-W=/var/log/wtmp
-if [ -f ${W}.0 ] ; then
- if [ -x /usr/sbin/ac ] ; then
+# 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
+
+case "$monthly_accounting_enable" in
+ [Yy][Ee][Ss])
+ W=/var/log/wtmp
+ if [ -f $W.0 ]
+ then
+ if [ -x /usr/sbin/ac ]
+ then
echo ""
echo "Doing login accounting:"
- ac -p -w ${W}.0 | sort -nr +1
- fi
-fi
+ ac -p -w $W.0 | sort -nr +1
+ fi
+ fi;;
+esac
diff --git a/etc/periodic/monthly/999.local b/etc/periodic/monthly/999.local
index 75fbebdb169a..b5d8aeda1c25 100755
--- a/etc/periodic/monthly/999.local
+++ b/etc/periodic/monthly/999.local
@@ -2,9 +2,25 @@
#
# $FreeBSD$
#
-if [ -f /etc/monthly.local ]; then
- echo ""
- echo "Running monthly.local:"
- sh /etc/monthly.local
+# 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
+
+for script in $monthly_local
+do
+ case "$script" in
+ /*)
+ if [ -f "$script" ]
+ then
+ echo ""
+ echo "Running $script:"
+
+ sh $script
+ fi;;
+ esac
+done