Date: Thu, 7 Mar 2002 11:06:19 -0500 (EST) From: Alan Eldridge <ports@geeksrus.net> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/35634: audio/rplay: install daemon startup as rc.d/rplayd.sh.sample Message-ID: <200203071606.g27G6JG02411@wwweasel.geeksrus.net>
next in thread | raw e-mail | index | archive | help
>Number: 35634 >Category: ports >Synopsis: audio/rplay: install daemon startup as rc.d/rplayd.sh.sample >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 07 08:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Alan Eldridge >Release: FreeBSD 4.5-STABLE i386 >Organization: Geeksrus.NET >Environment: System: FreeBSD wwweasel.geeksrus.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Mar 6 21:55:19 EST 2002 root@wwweasel.geeksrus.net:/usr/obj/usr/src/sys/WWWEASEL i386 >Description: NOTE: This port has no maintainer. I'm relying on a committer to apply these patches, since they do no harm and increase compliance with POLA. This package installs a startup script as rplayd.sh, which means it will get executed on next boot. However, since it may be installed as a dependency, when it is otherwise not wanted, installing a startup script that will run on boot isn't very nice. (If I install muttprint, and find that I got a network sound daemon started in the bargain, I'm not happy, but I *am* astonished. It goes like this: print/muttprint depends on mail/faces depends on audio/rplay depends on audio/gsm. That last one is innocuous. This one isn't.) This patch causes the script to be installed as rplayd.sh.sample. Also, the port doesn't overwrite existing etc/rplay.hosts, which is good. However, if you make a package, then whatever you already have in that file gets packaged. This is *not* good. This patch causes the rplay.hosts file to be written as rplay.hosts.sample. If no rplay.hosts exists, then rplay.hosts is written (or copied, with @exec, in the case of a package install). It is removed on uninstall if it is the same content as rplay.hosts.sample. >How-To-Repeat: >Fix: --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- Index: audio/rplay/Makefile =================================================================== RCS file: /home/alane/cvsroot/ports/audio/rplay/Makefile,v retrieving revision 1.20 diff -u -3 -r1.20 Makefile --- audio/rplay/Makefile 29 Jan 2002 09:33:25 -0000 1.20 +++ audio/rplay/Makefile 7 Mar 2002 15:55:24 -0000 @@ -7,6 +7,7 @@ PORTNAME= rplay PORTVERSION= 3.3.2 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://rplay.doit.org/dist/ @@ -32,12 +33,12 @@ .for info in ${INFO_FILES} @install-info ${PREFIX}/info/${info} ${PREFIX}/info/dir .endfor -.if !exists(${PREFIX}/etc/rc.d/rplayd.sh) - @${ECHO} "===> Installing ${PREFIX}/etc/rc.d/rplayd.sh startup file" - @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/rplayd.sh ${PREFIX}/etc/rc.d/rplayd.sh -.endif + @${ECHO} "===> Installing ${PREFIX}/etc/rc.d/rplayd.sh" + @${ECHO} "===> startup file as ${PREFIX}/etc/rc.d/rplayd.sh.sample" + @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/rplayd.sh ${PREFIX}/etc/rc.d/rplayd.sh.sample .if !exists(${PREFIX}/etc/rplay.hosts) @${ECHO_CMD} localhost > ${PREFIX}/etc/rplay.hosts .endif + @${ECHO_CMD} localhost > ${PREFIX}/etc/rplay.hosts.sample .include <bsd.port.mk> Index: audio/rplay/pkg-plist =================================================================== RCS file: /home/alane/cvsroot/ports/audio/rplay/pkg-plist,v retrieving revision 1.9 diff -u -3 -r1.9 pkg-plist --- audio/rplay/pkg-plist 28 Jun 2000 16:05:11 -0000 1.9 +++ audio/rplay/pkg-plist 7 Mar 2002 15:53:42 -0000 @@ -1,5 +1,7 @@ -etc/rc.d/rplayd.sh -etc/rplay.hosts +etc/rc.d/rplayd.sh.sample +@unexec if cmp %D/etc/rplay.hosts.sample %D/etc/rplay.hosts 2>/dev/null; then rm -f %D/etc/rplay.hosts; fi +etc/rplay.hosts.sample +@exec if test ! -f %D/etc/rplay.hosts; then cp -p %D/etc/rplay.hosts.sample %D/etc/rplay.hosts; fi bin/rplay bin/rptp sbin/rplayd --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- >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?200203071606.g27G6JG02411>