From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 26 02:34:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8207D1065674 for ; Mon, 26 Apr 2010 02:34:07 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id 2643F8FC12 for ; Mon, 26 Apr 2010 02:34:06 +0000 (UTC) Received: (qmail 3912 invoked by uid 399); 26 Apr 2010 02:34:05 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 26 Apr 2010 02:34:05 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BD4FB8C.2050000@FreeBSD.org> Date: Sun, 25 Apr 2010 19:33:48 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: Eitan Adler References: <4BCE5ECC.6070202@gmail.com> <4BCFE209.20501@FreeBSD.org> <20100422111758.GA39338@ei.bzerk.org> <4BD07F2D.3030809@FreeBSD.org> <4BD07FCB.4030604@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ruben de Groot , "Aryeh M. Friedman" , =?UTF-8?B?VHJvbmQgRW5kcmVzdMO4bA==?= Subject: Re: regenerating /var/db/pkg X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 02:34:07 -0000 FWIW, this looks fine to me. Have you submitted a PR? Doug On 04/22/10 10:05, Eitan Adler wrote: > Same as before - if all is good I'll send a PR > > #!/bin/sh > # > # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 > 2009/10/25 01:10:29 kensmith 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 > > bak=/var/backups > db_loc=$(/usr/bin/make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR 2>/dev/null) > bk_loc="$bak/pkgdb.bak.tar.bz2" > > case "$daily_backup_pkgdb_enable" in > [Yy][Ee][Ss]) > if [ ! -d $db_loc ] > then > echo '$daily_backup_pkgdb_enable is enabled but' \ > "$db_loc doesn't exist" > rc=2 > else > rc=0 > > echo "" > echo "Backing up package db directory:" > > [ -e $bk_loc ] && unlink $bk_loc > tar -cjf $bk_loc $db_loc || rc=3 > fi;; > > *) rc=0;; > esac > > exit $rc > -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/