pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/39701: rc.d script for audio/nas daemon
>Number: 39701
>Category: pkg
>Synopsis: rc.d script for audio/nas daemon
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Oct 05 08:50:00 +0000 2008
>Originator: cheusov%tut.by@localhost
>Release: NetBSD 4.0_STABLE
>Organization:
>Environment:
System: NetBSD chen.chizhovka.net 4.0_STABLE NetBSD 4.0_STABLE (GENERIC) #2:
Wed Sep 24 23:57:38 EEST 2008
cheusov%chen.chizhovka.net@localhost:/srv/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
audio/nas is a default audio server on NetBSD
but audio/nas has no rc.d script.
How about the following patch?
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/audio/nas/Makefile,v
retrieving revision 1.79
diff -u -r1.79 Makefile
--- Makefile 2 Dec 2007 08:32:23 -0000 1.79
+++ Makefile 5 Oct 2008 08:41:24 -0000
@@ -2,7 +2,7 @@
DISTNAME= nas-1.9.src
PKGNAME= ${DISTNAME:S/.src//}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nas/}
@@ -13,6 +13,8 @@
PKG_INSTALLATION_TYPES= overwrite pkgviews
PKG_DESTDIR_SUPPORT= user-destdir
+RCD_SCRIPTS= nasd
+
# 1) uses dia library before it is built
# 2) make succeeds even with failures, making this problem non-obvious
MAKE_JOBS_SAFE= no
Index: PLIST.server
===================================================================
RCS file: /cvsroot/pkgsrc/audio/nas/PLIST.server,v
retrieving revision 1.1
diff -u -r1.1 PLIST.server
--- PLIST.server 4 Jun 2005 23:43:51 -0000 1.1
+++ PLIST.server 5 Oct 2008 08:41:24 -0000
@@ -3,4 +3,5 @@
${IMAKE_MAN_DIR}/nasd.${IMAKE_MANNEWSUFFIX}
${IMAKE_FILEMAN_DIR}/nasd.conf.${IMAKE_FILEMAN_SUFFIX}
share/examples/nas/nasd.conf.eg
+share/examples/rc.d/nasd
@dirrm share/examples/nas
Index: files/nasd.sh
===================================================================
RCS file: files/nasd.sh
diff -N files/nasd.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/nasd.sh 5 Oct 2008 08:41:24 -0000
@@ -0,0 +1,27 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: nasd
+# REQUIRE: LOGIN
+
+. /etc/rc.subr
+
+name="nasd"
+reset_cmd="nasd_reset"
+nasd_flags='-b '${nasd_flags-"-aa -local"}
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+required_files="@PKG_SYSCONFDIR@/nasd.conf"
+extra_commands="reset"
+
+nasd_reset (){
+ echo "Closing all connections and restoring defaults."
+ pids="$(check_process $command)"
+ for pid in $pids; do
+ kill -HUP $pid
+ done
+}
+
+load_rc_config $name
+run_rc_command "$1"
Home |
Main Index |
Thread Index |
Old Index