diff options
author | bapt <bapt@FreeBSD.org> | 2013-10-31 13:00:35 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-10-31 13:00:35 +0000 |
commit | 4d11df94bddda963a5e3a0b05b77d7074b775a88 (patch) | |
tree | aedc92cd31cac1107753d1fa2f607d3f13c5d2f0 /etc/periodic/daily | |
parent | 316df01d906d074b33aad575eaed8f3b8c3b7a88 (diff) | |
download | FreeBSD-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/daily')
-rwxr-xr-x | etc/periodic/daily/220.backup-pkgdb | 51 | ||||
-rwxr-xr-x | etc/periodic/daily/490.status-pkg-changes | 43 | ||||
-rw-r--r-- | etc/periodic/daily/Makefile | 5 |
3 files changed, 0 insertions, 99 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 |