periodic: Remove obsolete daily/status-named and weekly/clean-kvmdb
authorAaron LI <aly@aaronly.me>
Thu, 8 Mar 2018 16:24:33 +0000 (00:24 +0800)
committerSascha Wildner <saw@online.de>
Mon, 12 Mar 2018 14:13:14 +0000 (15:13 +0100)
Makefile_upgrade.inc
etc/defaults/periodic.conf
etc/periodic/daily/470.status-named [deleted file]
etc/periodic/daily/Makefile
etc/periodic/weekly/120.clean-kvmdb [deleted file]
etc/periodic/weekly/Makefile
share/man/man5/periodic.conf.5

index 847cd7a..a8154ce 100644 (file)
@@ -3374,6 +3374,8 @@ TO_REMOVE+=/usr/share/man/man9/untimeout.9.gz
 TO_REMOVE+=/usr/include/machine/apm_bios.h
 TO_REMOVE+=/usr/share/man/man2/expreadv.2.gz
 TO_REMOVE+=/etc/periodic/monthly/300.statistics
+TO_REMOVE+=/etc/periodic/weekly/120.clean-kvmdb
+TO_REMOVE+=/etc/periodic/daily/470.status-named
 
 .if !defined(WANT_INSTALLER)
 TO_REMOVE+=/usr/sbin/dfuibe_installer
index 30c5e38..019f53c 100644 (file)
@@ -122,10 +122,6 @@ daily_status_security_enable="YES"                 # Security check
 daily_status_mail_rejects_enable="YES"                 # Check mail rejects
 daily_status_mail_rejects_logs=3                       # How many logs to check
 
-# 470.status-named
-daily_status_named_enable="YES"
-daily_status_named_usedns="YES"                                # DNS lookups are ok
-
 # 500.queuerun
 daily_queuerun_enable="YES"                            # Run mail queue
 daily_submit_queuerun="NO"                             # Also submit queue
@@ -195,11 +191,6 @@ weekly_show_success="YES"                          # scripts returning 0
 weekly_show_info="YES"                                 # scripts returning 1
 weekly_show_badconfig="NO"                             # scripts returning 2
 
-# 120.clean-kvmdb
-weekly_clean_kvmdb_enable="YES"                                # Clean kvmdb weekly
-weekly_clean_kvmdb_days=7                              # If not accessed for
-weekly_clean_kvmdb_verbose="YES"                       # Mention files deleted
-
 # 310.locate
 weekly_locate_enable="YES"                             # Update locate weekly
 
diff --git a/etc/periodic/daily/470.status-named b/etc/periodic/daily/470.status-named
deleted file mode 100644 (file)
index b85b6e5..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: src/etc/periodic/daily/470.status-named,v 1.8 2006/06/11 20:39:12 maxim Exp $
-#
-
-# 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
-
-catmsgs() {
-       find /var/log -name 'messages.*' -mtime -2 |
-           sort -t. -r -n -k 2,2 |
-           while read f
-           do
-               case $f in
-                   *.gz)       zcat -f $f;;
-                   *.bz2)      bzcat -f $f;;
-               esac
-           done
-       [ -f /var/log/messages ] && cat /var/log/messages
-}
-
-case "$daily_status_named_enable" in
-    [Yy][Ee][Ss])
-       echo
-       echo 'Checking for denied zone transfers (AXFR and IXFR):'
-
-       start=`date -v-1d '+%b %e'`
-       rc=$(catmsgs |
-           grep -E "^$start.*named\[[[:digit:]]+\]: transfer of .*failed .*: REFUSED" |
-           sed -e "s/.*transfer of \'\(.*\)\/IN\' from \(.*\)#[0-9]*: .*/\1 from \2/" |
-           sort -f | uniq -ic | (
-               usedns=0
-               case "$daily_status_named_usedns" in
-               '') ;;
-               [yY][eE][sS]) usedns=1 ;;
-               esac
-
-               while read line ;do
-                       ipaddr=`echo "$line" | sed -e 's/^.*from //'`
-                       if [ $usedns -eq 1 ]; then
-                               name=`host "${ipaddr}" 2>/dev/null | \
-                                  sed 's/.*domain name pointer \(.*\)\./\1/'`
-                       fi
-                       if [ -n "${name}" ]; then
-                               echo "${line} (${name})"
-                       else
-                               echo "${line}"
-                       fi
-               done ) | \
-               tee /dev/stderr | wc -l)
-       [ $rc -gt 0 ] && rc=1
-       ;;
-
-    *)  rc=0;;
-esac
-
-exit $rc
index 365dcc9..466fd9b 100644 (file)
@@ -19,7 +19,6 @@ FILES=        100.clean-disks \
        440.status-mailq \
        450.status-security \
        460.status-mail-rejects \
-       470.status-named \
        500.queuerun \
        999.local
 
diff --git a/etc/periodic/weekly/120.clean-kvmdb b/etc/periodic/weekly/120.clean-kvmdb
deleted file mode 100644 (file)
index b045a2f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh -
-#
-# $FreeBSD: src/etc/periodic/weekly/120.clean-kvmdb,v 1.4.2.2 2000/09/20 02:46:17 jkh Exp $
-# $DragonFly: src/etc/periodic/weekly/120.clean-kvmdb,v 1.2 2003/06/17 04:24:48 dillon Exp $
-#
-
-# 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 "$weekly_clean_kvmdb_enable" in
-    [Yy][Ee][Ss])
-       if [ ! -d /var/db ]
-       then
-           echo '$weekly_clean_kvmdb_enable is set but /var/db' \
-               "doesn't exist"
-           rc=2
-       elif [ -z "$weekly_clean_kvmdb_days" ]
-       then
-           echo '$weekly_clean_kvmdb_enable is set but' \
-               '$weekly_clean_kvmdb_days is not'
-           rc=2
-       else
-           echo ""
-           echo "Cleaning up kernel database files:"
-
-           kernel=`sysctl -n kern.bootfile`
-           kernel=kvm_${kernel##*/}.db
-
-           case "$weekly_clean_kvmdb_verbose" in
-               [Yy][Ee][Ss])
-                   print=-print;;
-               *)
-                   print=;;
-           esac
-
-           rc=$(find /var/db -name "kvm_*.db" ! -name $kernel \
-               -atime +$weekly_clean_kvmdb_days -delete $print |
-               tee /dev/stderr | wc -l)
-           [ -z "$print" ] && rc=0
-           [ $rc -gt 1 ] && rc=1
-       fi;;
-
-    *)  rc=0;;
-esac
-
-exit $rc
index 8d44a37..3300a64 100644 (file)
@@ -1,8 +1,6 @@
 # $FreeBSD: src/etc/periodic/weekly/Makefile,v 1.4.2.3 2002/07/18 12:36:07 ru Exp $
-# $DragonFly: src/etc/periodic/weekly/Makefile,v 1.4 2006/01/15 11:42:50 swildner Exp $
 
-FILES= 120.clean-kvmdb \
-       310.locate \
+FILES= 310.locate \
        320.whatis \
        330.catman \
        340.noid \
index 4786700..1ad0e85 100644 (file)
@@ -596,17 +596,6 @@ for the previous day.
 .Pq Vt num
 Set to the number of maillog files that should be checked
 for yesterday's mail rejects.
-.It Va daily_status_named_enable
-.Pq Vt bool
-Set to
-.Dq YES
-if you want to summarise denied zone transfers (AXFR and IXFR)
-for the previous day.
-.It Va daily_status_named_usedns
-.Pq Vt bool
-Set to
-.Dq YES
-if you want to enable reverse DNS lookups.
 .It Va daily_queuerun_enable
 .Pq Vt bool
 Set to
@@ -631,23 +620,6 @@ All scripts must be absolute path names.
 The following variables are used by the standard scripts that reside in
 .Pa /etc/periodic/weekly :
 .Bl -tag -offset 4n -width 2n
-.It Va weekly_clean_kvmdb_enable
-.Pq Vt bool
-Set to
-.Dq YES
-if you want to purge old
-.Pa /var/db/kvm_*.db
-files.
-The kvm file for the current kernel will not be purged.
-.It Va weekly_clean_kvmdb_days
-.Pq Vt num
-Set to the number of days that the file must not have been accessed
-before being deleted.
-.It Va weekly_clean_kvmdb_verbose
-.Pq Vt bool
-Set to
-.Dq YES
-if you want the removed files to be reported in your weekly output.
 .It Va weekly_locate_enable
 .Pq Vt bool
 Set to