aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2011-05-05 02:35:11 +0000
committerDoug Barton <dougb@FreeBSD.org>2011-05-05 02:35:11 +0000
commitf7e2bd045867a9faaee5537bc2cf4dfd2028b264 (patch)
treef86bb3ee8d603bf9828b13bdbfde075d26204a15 /etc
parent8820ce5fe7601562afdf4685e2baf2a415a4ab87 (diff)
Notes
Diffstat (limited to 'etc')
-rwxr-xr-xetc/periodic/daily/220.backup-pkgdb5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/periodic/daily/220.backup-pkgdb b/etc/periodic/daily/220.backup-pkgdb
index 8a37b1cd8606..a6b50e5b2767 100755
--- a/etc/periodic/daily/220.backup-pkgdb
+++ b/etc/periodic/daily/220.backup-pkgdb
@@ -18,7 +18,8 @@ case "$daily_backup_pkgdb_enable" in
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=`make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR 2>/dev/null` ||
+ pkg_dbdir=/var/db/pkg
if [ ! -d "$bak" ]
then
@@ -33,7 +34,7 @@ case "$daily_backup_pkgdb_enable" in
new_bak_file=`mktemp ${bak_file}-XXXXX`
- if tar -cjf "${new_bak_file}" "$pkg_dbdir"; then
+ 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