From owner-freebsd-ports@FreeBSD.ORG Tue Jan 2 05:27:11 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E36BE16A40F for ; Tue, 2 Jan 2007 05:27:11 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [204.127.192.82]) by mx1.freebsd.org (Postfix) with ESMTP id D068613C457 for ; Tue, 2 Jan 2007 05:27:11 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from icarus.home.lan (c-67-174-220-97.hsd1.ca.comcast.net[67.174.220.97]) by comcast.net (rwcrmhc12) with ESMTP id <20070102052711m1200smorue>; Tue, 2 Jan 2007 05:27:11 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 9BFFA1FA037; Mon, 1 Jan 2007 21:27:10 -0800 (PST) Date: Mon, 1 Jan 2007 21:27:10 -0800 From: Jeremy Chadwick To: Beech Rintoul Message-ID: <20070102052710.GA69315@icarus.home.lan> Mail-Followup-To: Beech Rintoul , freebsd-ports@freebsd.org References: <200701011956.14607.freebsd@alaskaparadise.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701011956.14607.freebsd@alaskaparadise.com> X-PGP-Key: http://jdc.parodius.com/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-ports@freebsd.org Subject: Re: Port deletes .conf file on update X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 05:27:12 -0000 On Mon, Jan 01, 2007 at 07:56:12PM -0900, Beech Rintoul wrote: > ftp/proftpd deletes /usr/local/etc/proftpd.conf when updating. I thought I had > it fixed, but it continues to delete the config. Here's the section in the > makefile: > > post-install: > [ -f ${PREFIX}/etc/proftpd.conf ] || \ > ${CP} ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf.sample > > ... > > It creates proftpd.conf.sample properly, but then deletes proftpd.conf. BTW > proftpd.conf is not in the pkg-plist. > > How do I fix this? My guess is that the actual proftpd Makefile (not the port Makefile) is doing something during "make install" which nukes the existing proftpd.conf in PREFIX/etc. Logically your Makefile sh code looks like it should do exactly what you intend it (copy the EXAMPLESDIR configuration to etc as .sample if the test(1) returns a non-zero exit code). I assume it still breaks if you change the above sh code to the following? if [ ! -f ${PREFIX}/etc/proftpd.conf ] then ${CP} ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf.sample fi -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |