summaryrefslogtreecommitdiffstats
path: root/etc/periodic
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-10-31 13:00:35 +0000
committerbapt <bapt@FreeBSD.org>2013-10-31 13:00:35 +0000
commit4d11df94bddda963a5e3a0b05b77d7074b775a88 (patch)
treeaedc92cd31cac1107753d1fa2f607d3f13c5d2f0 /etc/periodic
parent316df01d906d074b33aad575eaed8f3b8c3b7a88 (diff)
downloadFreeBSD-src-4d11df94bddda963a5e3a0b05b77d7074b775a88.zip
FreeBSD-src-4d11df94bddda963a5e3a0b05b77d7074b775a88.tar.gz
After around 20 years of duty it is time for pkg_install to retire
Diffstat (limited to 'etc/periodic')
-rwxr-xr-xetc/periodic/daily/220.backup-pkgdb51
-rwxr-xr-xetc/periodic/daily/490.status-pkg-changes43
-rw-r--r--etc/periodic/daily/Makefile5
-rwxr-xr-xetc/periodic/security/460.chkportsum66
-rw-r--r--etc/periodic/security/Makefile4
-rwxr-xr-xetc/periodic/weekly/400.status-pkg33
-rw-r--r--etc/periodic/weekly/Makefile4
7 files changed, 0 insertions, 206 deletions
diff --git a/etc/periodic/daily/220.backup-pkgdb b/etc/periodic/daily/220.backup-pkgdb
deleted file mode 100755
index 82bf0b3..0000000
--- a/etc/periodic/daily/220.backup-pkgdb
+++ /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
-
-rc=0
-
-case "$daily_backup_pkgdb_enable" in
- [Yy][Ee][Ss])
- bak="${daily_backup_pkgdb_dir:-/var/backups}"
- bak_file="${bak}/pkgdb.bak.tbz"
-
- pkg_dbdir=`make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR 2>/dev/null` ||
- pkg_dbdir=/var/db/pkg
-
- if [ ! -d "$bak" ]
- then
- install -d -o root -g wheel -m 750 $bak || {
- echo '$daily_backup_pkgdb_enable is enabled but' \
- "$daily_backup_pkgdb_dir doesn't exist" ;
- exit 2 ; }
- fi
-
- echo ''
- echo 'Backing up package db directory:'
-
- new_bak_file=`mktemp ${bak_file}-XXXXX`
-
- if tar -cjHf "${new_bak_file}" "$pkg_dbdir" 2>/dev/null; then
- chmod 644 "${new_bak_file}"
-
- if [ -e "${bak_file}.2" -a -e "${bak_file}" ]; then
- unlink "${bak_file}.2"
- mv "${bak_file}" "${bak_file}.2"
- fi
- [ -e "${bak_file}" ] && mv "${bak_file}" "${bak_file}.2"
- mv "${new_bak_file}" "${bak_file}"
- else
- rc=3
- fi ;;
-esac
-
-exit $rc
diff --git a/etc/periodic/daily/490.status-pkg-changes b/etc/periodic/daily/490.status-pkg-changes
deleted file mode 100755
index 548e10a..0000000
--- a/etc/periodic/daily/490.status-pkg-changes
+++ /dev/null
@@ -1,43 +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
-
-case "$daily_status_pkg_changes_enable" in
- [Yy][Ee][Ss])
- if [ ! -f /usr/sbin/pkg_info ]; then
- echo '$daily_status_pkg_changes_enable is enabled but' \
- "/usr/sbin/pkg_info doesn't exist"
- rc=2
- else
- bak=/var/backups
- rc=0
-
- if [ -f $bak/pkg_info.bak ]; then
- mv -f $bak/pkg_info.bak $bak/pkg_info.bak2
- fi
- ${pkg_info:-/usr/sbin/pkg_info} > $bak/pkg_info.bak
-
- cmp -sz $bak/pkg_info.bak $bak/pkg_info.bak2
- if [ $? -eq 1 ]; then
- echo ""
- echo "Changes in installed packages:"
- diff -U 0 $bak/pkg_info.bak2 $bak/pkg_info.bak \
- | grep '^[-+][^-+]' | sort -k 1.2
- fi
- fi
- ;;
-
- *)
- rc=0
- ;;
-esac
-
-exit $rc
diff --git a/etc/periodic/daily/Makefile b/etc/periodic/daily/Makefile
index 6909e30..aa28351 100644
--- a/etc/periodic/daily/Makefile
+++ b/etc/periodic/daily/Makefile
@@ -36,11 +36,6 @@ FILES+= 130.clean-msgs
FILES+= 480.status-ntpd
.endif
-.if ${MK_PKGTOOLS} != "no"
-FILES+= 220.backup-pkgdb \
- 490.status-pkg-changes
-.endif
-
.if ${MK_RCMDS} != "no"
FILES+= 140.clean-rwho \
430.status-rwho
diff --git a/etc/periodic/security/460.chkportsum b/etc/periodic/security/460.chkportsum
deleted file mode 100755
index 18a12ec..0000000
--- a/etc/periodic/security/460.chkportsum
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh -
-#
-# Copyright (c) 2010 The FreeBSD Project
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD$
-#
-
-if [ -r /etc/defaults/periodic.conf ]
-then
- . /etc/defaults/periodic.conf
- source_periodic_confs
-fi
-
-. /etc/periodic/security/security.functions
-
-security_daily_compat_var security_status_chkportsum_enable
-
-rc=0
-
-echo ""
-echo 'Checking for ports with mismatched checksums:'
-
-if check_yesno_period security_status_chkportsum_enable
-then
- set -f
- pkg_info -ga 2>/dev/null | \
- while IFS= read -r line; do
- set -- $line
- case $1 in
- Information)
- case $2 in
- for) name="${3%%:}" ;;
- *) name='??' ;;
- esac
- ;;
- Mismatched|'') ;;
- *) [ -n "${name}" ] &&
- echo "${name}: ${line%% fails the original MD5 checksum}"
- ;;
- esac
- done
-fi
-
-exit $rc
diff --git a/etc/periodic/security/Makefile b/etc/periodic/security/Makefile
index fbcd454..c5af2f8 100644
--- a/etc/periodic/security/Makefile
+++ b/etc/periodic/security/Makefile
@@ -29,8 +29,4 @@ FILES+= 500.ipfwdenied \
FILES+= 520.pfdenied
.endif
-.if ${MK_PKGTOOLS} != "no"
-FILES+= 460.chkportsum
-.endif
-
.include <bsd.prog.mk>
diff --git a/etc/periodic/weekly/400.status-pkg b/etc/periodic/weekly/400.status-pkg
deleted file mode 100755
index 785c2ff..0000000
--- a/etc/periodic/weekly/400.status-pkg
+++ /dev/null
@@ -1,33 +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
-
-case "$weekly_status_pkg_enable" in
- [Yy][Ee][Ss])
- echo ""
- echo "Check for out of date packages:"
-
- rc=$(${pkg_version:-pkg_version} -v ${pkg_version_index} |
- sed -n -e 's/^\([^ ]*\) *< */ \1 /p' \
- -e '/^[^ ]*-\([^ ]*\) *\* *multiple versions.*[ ,]\1[,)].*/d' \
- -e 's/^\([^ ]*\) *\* *multiple versions.*\((.*\)/ \1 needs updating \2/p' \
- -e 's/^\(bsdpan-[^ ]*\) *? *unknown in index/ \1 may be outdated - check CPAN version manually/p' \
- -e 's/^\([^ ]*-[^ ]*\) *? *unknown in index/ \1 is obsolete/p' \
- -e 's/^\([^ ]*-[^ ]*\) *? *\(orphaned:.*\)$/ \1 was \2/p' |
- tee /dev/stderr |
- wc -l)
- [ $rc -gt 1 ] && rc=1;;
-
- *) rc=0;;
-esac
-
-exit $rc
diff --git a/etc/periodic/weekly/Makefile b/etc/periodic/weekly/Makefile
index 057653d..b6f77c4 100644
--- a/etc/periodic/weekly/Makefile
+++ b/etc/periodic/weekly/Makefile
@@ -16,8 +16,4 @@ FILES+= 310.locate
FILES+= 320.whatis 330.catman
.endif
-.if ${MK_PKGTOOLS} != "no"
-FILES+= 400.status-pkg
-.endif
-
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud