From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 26 02:56:09 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 3C590106566C for ; Mon, 26 Apr 2010 02:56:09 +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 D27958FC18 for ; Mon, 26 Apr 2010 02:56:08 +0000 (UTC) Received: (qmail 26871 invoked by uid 399); 26 Apr 2010 02:56:05 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 26 Apr 2010 02:56:05 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BD5009C.20300@FreeBSD.org> Date: Sun, 25 Apr 2010 19:55:24 -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: Garrett Cooper 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=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Eitan Adler , "Aryeh M. Friedman" , freebsd-hackers@freebsd.org, Ruben de Groot , =?ISO-8859-1?Q?ndrest=F8l?= , =?ISO-8859-1?Q?Trond_E?= 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:56:09 -0000 On 04/25/10 19:44, Garrett Cooper wrote: > On Thu, Apr 22, 2010 at 10:05 AM, 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]) > > This could be done via rc.subr's checkyesno function. It's periodic, not rc.d. :) >> if [ ! -d $db_loc ] > > Please quote the string. I generally do quote the string as a matter of paranoia, however the practical result is likely to be the same. Doug -- ... 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/