pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sndio: Add scratch of rc.d(8) script



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Nov 29 03:56:44 2015 +0100
Changeset:	e1744ccde68cdc11d0084c155ce1d843b23e4eaf

Added Files:
	sndio/files/sndio.sh

Log Message:
sndio: Add scratch of rc.d(8) script

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e1744ccde68cdc11d0084c155ce1d843b23e4eaf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 sndio/files/sndio.sh | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diffs:
diff --git a/sndio/files/sndio.sh b/sndio/files/sndio.sh
new file mode 100644
index 0000000..9f991ba
--- /dev/null
+++ b/sndio/files/sndio.sh
@@ -0,0 +1,28 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: sndio
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="sndio"
+rcvar=$name
+command="@PREFIX@/bin/sndiod"
+pidfile="@VARBASE@/run/sndio/pid"
+start_precmd=sndio_prestart
+
+sndio_prestart() {
+	dir="@VARBASE@/run/sndio"
+	if @TEST@ ! -d $dir; then
+		@MKDIR@ $dir
+		@CHMOD@ 0755 $dir
+		@CHOWN@ @DBUS_USER@:@DBUS_GROUP@ $dir
+	fi
+	@PREFIX@/bin/dbus-uuidgen --ensure
+}
+
+load_rc_config $name
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index