3
echo "Setting up Open Sound System....please wait"
5
rm -f ${PKG_INSTALL_ROOT}/etc/rc3.d/S80ossinstall # Remove temporary installer
7
# Remove previous sound drivers and make a backup of the removed
8
# /etc/driver_aliases lines.
9
rem_drv oss > /dev/null 2>&1 # OSS 3.99.x and earlier
10
rem_drv ossaudios > /dev/null 2>&1 # Old name for sadasupport
12
for n in `ls /kernel/drv|grep audio|grep -v .conf` usb_ac usb_as
14
echo Removing old driver $n
15
# Copy the /etc/driver_aliases entries for the SADA drivers to a backup
16
# file so that the drivers could be restored later.
17
grep "^$n " ${PKG_INSTALL_ROOT}/etc/driver_aliases >> ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.removed
19
rem_drv $n > /dev/null 2>&1 # Remove the driver
22
# Make sure the driver aliases collection doesn't contain duplicate lines
23
sort ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.removed|uniq > ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.bak
24
mv ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.bak ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.removed
25
rm -f ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.bak
27
# Remove previous OSS and SADA devices
28
rm -f ${PKG_INSTALL_ROOT}/dev/sound/*
29
rm -f ${PKG_INSTALL_ROOT}/dev/audio*
30
rm -f ${PKG_INSTALL_ROOT}/dev/dsp*
31
rm -f ${PKG_INSTALL_ROOT}/dev/mixer*
32
rm -f ${PKG_INSTALL_ROOT}/dev/midi*
33
rm -f ${PKG_INSTALL_ROOT}/dev/sndstat
34
rm -f ${PKG_INSTALL_ROOT}/dev/sequencer
35
rm -f ${PKG_INSTALL_ROOT}/dev/music
37
(cd ${PKG_INSTALL_ROOT}/etc/rc3.d;ln -s ../init.d/oss S89oss)
41
rm -f ${PKG_INSTALL_ROOT}/tmp/osspkg.tmp
42
grep -v type=oss_ ${PKG_INSTALL_ROOT}/etc/devlink.tab > ${PKG_INSTALL_ROOT}/tmp/osspkg.tmp
43
cat ${PKG_INSTALL_ROOT}/tmp/osspkg.tmp > ${PKG_INSTALL_ROOT}/etc/devlink.tab
44
cat >> ${PKG_INSTALL_ROOT}/etc/devlink.tab <<EOF
46
type=oss_audio oss/\M1/\M2
49
if test ! -f ${PKG_INSTALL_ROOT}/etc/oss/userdefs
51
echo "autosave_mixer yes" > ${PKG_INSTALL_ROOT}/etc/oss/userdefs
54
if ${PKG_INSTALL_ROOT}/usr/xpg4/bin/grep -q 'install_imux yes' $OSSLIBDIR/etc/oss/userdefs
56
# Install the imux driver
57
${PKG_INSTALL_ROOT}/usr/sbin/ossdetect -i
59
${PKG_INSTALL_ROOT}/usr/sbin/ossdetect
62
${PKG_INSTALL_ROOT}/usr/sbin/devlinks
63
${PKG_INSTALL_ROOT}/usr/sbin/ossdevlinks
65
if test "`ossinfo -g|grep TRIAL` " != " "
70
echo "************************************************************"
71
echo "* NOTE! You are using trial version of Open Sound System *"
72
echo "************************************************************"
78
if test "`ossinfo -g|grep EXPIRED` " != " "
83
echo "****************************************************************"
84
echo "* NOTE! Your Open Sound System evaluation license has expired *"
85
echo "****************************************************************"
94
echo Open Sound System installation complete
96
echo You can use the osstest command to test audio playback in your system.
98
echo It may be necessary to reboot the system before all devices get properly
99
echo detected by the system.