Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2000 07:04:41 -0400 (EDT)
From:      jim@thehousleys.net
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/21288: Modify net/trafshow to not destron ${PREFIX}/etc/trafshow
Message-ID:  <200009151104.e8FB4fA35241@baby.int.thehousleys.net>

next in thread | raw e-mail | index | archive | help

>Number:         21288
>Category:       ports
>Synopsis:       Modify net/trafshow to not destron ${PREFIX}/etc/trafshow
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 15 04:10:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     James E. Housley
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
The Housleys dot Net
>Environment:

	

>Description:

	net/trafshow installs it's configuration file in ${PREFIX}/etc.
	No sample file is installed.  If for some reason the port is
	uninstalled and re-installed all changes are lost.  This patch
	installs trafshow.dist into ${PREFIX}/etc.  If trafshow does not
	exist in ${PREFIX}/etc then trafshow.dist is copied to trafshow.

	On the uninstall side ${PREFIX}/etc/trafshow is only deleted if
	it is the same as ${PREFIX}/etc/trafshow.dist

>How-To-Repeat:

	

>Fix:

--- trafshow/Makefile.orig	Thu Jun 29 18:23:54 2000
+++ trafshow/Makefile	Fri Sep 15 06:53:58 2000
@@ -31,6 +31,7 @@
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/trafshow ${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/trafshow.1 ${PREFIX}/man/man1
-	${INSTALL_DATA} ${WRKSRC}/.trafshow ${PREFIX}/etc/trafshow
+	${INSTALL_DATA} ${WRKSRC}/.trafshow ${PREFIX}/etc/trafshow.dist
+	${CP} ${PREFIX}/etc/trafshow.dist ${PREFIX}/etc/trafshow
 
 .include <bsd.port.post.mk>
--- trafshow/pkg/PLIST.orig	Tue Jan 25 08:47:45 2000
+++ trafshow/pkg/PLIST	Fri Sep 15 06:55:58 2000
@@ -1,2 +1,4 @@
 bin/trafshow
-etc/trafshow
+@unexec if cmp -s %D/etc/trafshow %D/etc/trafshow.dist; then rm -f %D/etc/trafshow; fi
+etc/trafshow.dist
+@exec if [ ! -f %D/etc/trafshow.dist ]; then cp -p %D/%F %B/trafshow.dist; fi


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009151104.e8FB4fA35241>