From owner-freebsd-ports@FreeBSD.ORG Mon Jun 28 22:53:45 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23A57106566B for ; Mon, 28 Jun 2010 22:53:45 +0000 (UTC) (envelope-from prvs=7882a28cd=pschmehl_lists@tx.rr.com) Received: from ip-002.utdallas.edu (ip-002.utdallas.edu [129.110.20.108]) by mx1.freebsd.org (Postfix) with ESMTP id ECCA48FC13 for ; Mon, 28 Jun 2010 22:53:44 +0000 (UTC) X-Group: None X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAN69KEyBbgog/2dsb2JhbACgJ8E9hSQEg2Y X-IronPort-AV: E=Sophos;i="4.53,499,1272862800"; d="scan'208";a="32497622" Received: from zxtm01.utdallas.edu (HELO utd65257.utdallas.edu) ([129.110.10.32]) by ip-002.utdallas.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 28 Jun 2010 17:24:47 -0500 Date: Mon, 28 Jun 2010 17:24:44 -0500 From: Paul Schmehl To: FreeBSD Ports Message-ID: X-Mailer: Mulberry/4.0.6 (Linux/x86) X-Munged-Reply-To: Figure it out MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: This construction doesn't work X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 22:53:45 -0000 I'm working on a port update for one of the ports that I maintain, and I've run into a problem that I can't seem to solve. I use this construction to ensure that the port doesn't overwrite the conf file, if one exists: .for f in barnyard2.conf ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample [ -f ${PREFIX}/etc/${f} ] || \ ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f} .endfor But it gets overwritten anyway. What am I doing wrong? I thought this worked before, but I can't be sure. Testing proves that it does not work now. I tried to changing to an if [ ! -f construction, but that didn't do a thing. -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson