summaryrefslogtreecommitdiff
path: root/audio/oss
diff options
context:
space:
mode:
authorjlam <jlam>2002-10-02 21:06:53 +0000
committerjlam <jlam>2002-10-02 21:06:53 +0000
commit4dcea0280818a4677b82c147dd580db8dc550201 (patch)
tree214fe57f5dae37bbc0133b2a6150b5fbce35f7f9 /audio/oss
parent341e00ea97e607dabb244fbf9db2bf67f1b8381c (diff)
downloadpkgsrc-4dcea0280818a4677b82c147dd580db8dc550201.tar.gz
* Move sound{on,off,conf} to ${PREFIX}/sbin.
* Make the oss rc.d script smarter: check that soundconf has been run before starting, and check that the OSS LKM is loaded before unloading it when stopping. * Ensure the OSS LKM is unloaded before deinstalling.
Diffstat (limited to 'audio/oss')
-rw-r--r--audio/oss/DEINSTALL8
-rw-r--r--audio/oss/Makefile8
-rw-r--r--audio/oss/PLIST8
-rw-r--r--audio/oss/files/oss.sh22
4 files changed, 30 insertions, 16 deletions
diff --git a/audio/oss/DEINSTALL b/audio/oss/DEINSTALL
index 73166c46691..e24896203d9 100644
--- a/audio/oss/DEINSTALL
+++ b/audio/oss/DEINSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: DEINSTALL,v 1.1.1.1 2002/10/02 20:33:31 jlam Exp $
+# $NetBSD: DEINSTALL,v 1.2 2002/10/02 21:06:53 jlam Exp $
OSSLIBDIR="@OSSLIBDIR@"
SFILES="@SFILES@"
@@ -6,6 +6,12 @@ SFILES="@SFILES@"
case ${STAGE} in
DEINSTALL)
#
+ # Ensure the OSS LKM is unloaded.
+ #
+ if [ -f @RCD_SCRIPTS@/oss ]; then
+ @RCD_SCRIPTS@/oss forcestop
+ fi
+ #
# Unconditionally remove the OSS files in /etc.
#
for file in ${SFILES}; do
diff --git a/audio/oss/Makefile b/audio/oss/Makefile
index 877b4879490..5798b263149 100644
--- a/audio/oss/Makefile
+++ b/audio/oss/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2002/10/02 20:33:30 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2002/10/02 21:06:53 jlam Exp $
DISTNAME= oss397d-netbsd-v1.6
PKGNAME= oss-3.97d
@@ -64,9 +64,9 @@ do-install: chroot
${LN} -sf ../lib/oss/play ${PREFIX}/bin/ossplay
${LN} -sf ../lib/oss/record ${PREFIX}/bin/ossrecord
${LN} -sf ../lib/oss/savemixer ${PREFIX}/bin/osssavemixer
- ${LN} -sf ../lib/oss/soundconf ${PREFIX}/bin/soundconf
- ${LN} -sf ../lib/oss/soundoff ${PREFIX}/bin/soundoff
- ${LN} -sf ../lib/oss/soundon ${PREFIX}/bin/soundon
+ ${LN} -sf ../lib/oss/soundconf ${PREFIX}/sbin/soundconf
+ ${LN} -sf ../lib/oss/soundoff ${PREFIX}/sbin/soundoff
+ ${LN} -sf ../lib/oss/soundon ${PREFIX}/sbin/soundon
${RM} -rf ${WRKSRC}/bin ${WRKSRC}/sbin ${WRKSRC}/usr
${RM} -f ${WRKSRC}/dev/mixer0 ${WRKSRC}/dev/null
diff --git a/audio/oss/PLIST b/audio/oss/PLIST
index dd87e3dc0f8..549019b45f2 100644
--- a/audio/oss/PLIST
+++ b/audio/oss/PLIST
@@ -1,13 +1,10 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2002/10/02 20:33:31 jlam Exp $
+@comment $NetBSD: PLIST,v 1.2 2002/10/02 21:06:54 jlam Exp $
bin/ossplay
bin/ossmixer
bin/ossmplay
bin/ossrecord
bin/osssavemixer
bin/ossxmix
-bin/soundconf
-bin/soundoff
-bin/soundon
lib/oss/Cards.lis
lib/oss/LICENSE
lib/oss/MAKEDEV.oss
@@ -95,6 +92,9 @@ lib/oss/ui_curses.so
lib/oss/ultrasound.h
lib/oss/uninstall.sh
lib/oss/za2v2.dat
+sbin/soundconf
+sbin/soundoff
+sbin/soundon
@dirrm lib/oss/include/sys
@dirrm lib/oss/include
@dirrm lib/oss/docs
diff --git a/audio/oss/files/oss.sh b/audio/oss/files/oss.sh
index 31ae0be8218..f423dad3bcf 100644
--- a/audio/oss/files/oss.sh
+++ b/audio/oss/files/oss.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: oss.sh,v 1.2 2002/10/02 20:46:46 jlam Exp $
+# $NetBSD: oss.sh,v 1.3 2002/10/02 21:06:55 jlam Exp $
#
# PROVIDE: oss
# REQUIRE: aftermountlkm
@@ -12,23 +12,31 @@ fi
name="oss"
rcvar=$name
-required_files="/etc/oss.conf"
+required_files="/etc/oss.conf @OSSLIBDIR@/devices.cfg"
start_cmd="oss_start"
stop_cmd="oss_stop"
oss_start()
{
- if [ -x @PREFIX@/bin/soundon ]; then
+ missing_files=
+ for file in ${required_files}; do
+ if [ ! -f "${file}" ]; then
+ missing_files="${missing_files} ${file}"
+ fi
+ done
+ if [ -z "${missing_files}" -a -x @PREFIX@/sbin/soundon ]; then
@ECHO@ "Starting ${name}."
- @PREFIX@/bin/soundon
+ @PREFIX@/sbin/soundon
fi
}
oss_stop()
{
- if [ -x @PREFIX@/bin/soundoff ]; then
- @ECHO@ "Stopping ${name}."
- @PREFIX@/bin/soundoff
+ if modstat -n oss >/dev/null; then
+ if [ -x @PREFIX@/sbin/soundoff ]; then
+ @ECHO@ "Stopping ${name}."
+ @PREFIX@/sbin/soundoff
+ fi
fi
}