summaryrefslogtreecommitdiff
path: root/setup/SunOS/postinstall
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-05-03 21:08:42 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-05-03 21:08:42 +0400
commit1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch)
tree4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/SunOS/postinstall
downloadoss4-upstream/4.2-build2006.tar.gz
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/SunOS/postinstall')
-rw-r--r--setup/SunOS/postinstall101
1 files changed, 101 insertions, 0 deletions
diff --git a/setup/SunOS/postinstall b/setup/SunOS/postinstall
new file mode 100644
index 0000000..94e02d4
--- /dev/null
+++ b/setup/SunOS/postinstall
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+echo "Setting up Open Sound System....please wait"
+
+rm -f ${PKG_INSTALL_ROOT}/etc/rc3.d/S80ossinstall # Remove temporary installer
+
+# Remove previous sound drivers and make a backup of the removed
+# /etc/driver_aliases lines.
+rem_drv oss > /dev/null 2>&1 # OSS 3.99.x and earlier
+rem_drv ossaudios > /dev/null 2>&1 # Old name for sadasupport
+
+for n in `ls /kernel/drv|grep audio|grep -v .conf` usb_ac usb_as
+do
+ echo Removing old driver $n
+ # Copy the /etc/driver_aliases entries for the SADA drivers to a backup
+ # file so that the drivers could be restored later.
+ grep "^$n " ${PKG_INSTALL_ROOT}/etc/driver_aliases >> ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.removed
+
+ rem_drv $n > /dev/null 2>&1 # Remove the driver
+done
+
+# Make sure the driver aliases collection doesn't contain duplicate lines
+sort ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.removed|uniq > ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.bak
+mv ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.bak ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.removed
+rm -f ${PKG_INSTALL_ROOT}/etc/oss/driver_aliases.bak
+
+# Remove previous OSS and SADA devices
+rm -f ${PKG_INSTALL_ROOT}/dev/sound/*
+rm -f ${PKG_INSTALL_ROOT}/dev/audio*
+rm -f ${PKG_INSTALL_ROOT}/dev/dsp*
+rm -f ${PKG_INSTALL_ROOT}/dev/mixer*
+rm -f ${PKG_INSTALL_ROOT}/dev/midi*
+rm -f ${PKG_INSTALL_ROOT}/dev/sndstat
+rm -f ${PKG_INSTALL_ROOT}/dev/sequencer
+rm -f ${PKG_INSTALL_ROOT}/dev/music
+
+(cd ${PKG_INSTALL_ROOT}/etc/rc3.d;ln -s ../init.d/oss S89oss)
+
+sync
+
+rm -f ${PKG_INSTALL_ROOT}/tmp/osspkg.tmp
+grep -v type=oss_ ${PKG_INSTALL_ROOT}/etc/devlink.tab > ${PKG_INSTALL_ROOT}/tmp/osspkg.tmp
+cat ${PKG_INSTALL_ROOT}/tmp/osspkg.tmp > ${PKG_INSTALL_ROOT}/etc/devlink.tab
+cat >> ${PKG_INSTALL_ROOT}/etc/devlink.tab <<EOF
+type=oss_sysdev \M0
+type=oss_audio oss/\M1/\M2
+EOF
+
+if test ! -f ${PKG_INSTALL_ROOT}/etc/oss/userdefs
+then
+ echo "autosave_mixer yes" > ${PKG_INSTALL_ROOT}/etc/oss/userdefs
+fi
+
+if ${PKG_INSTALL_ROOT}/usr/xpg4/bin/grep -q 'install_imux yes' $OSSLIBDIR/etc/oss/userdefs
+then
+ # Install the imux driver
+ ${PKG_INSTALL_ROOT}/usr/sbin/ossdetect -i
+else
+ ${PKG_INSTALL_ROOT}/usr/sbin/ossdetect
+fi
+
+${PKG_INSTALL_ROOT}/usr/sbin/devlinks
+${PKG_INSTALL_ROOT}/usr/sbin/ossdevlinks
+
+if test "`ossinfo -g|grep TRIAL` " != " "
+then
+ echo
+ echo
+ echo
+ echo "************************************************************"
+ echo "* NOTE! You are using trial version of Open Sound System *"
+ echo "************************************************************"
+ echo
+
+ sleep 10
+fi
+
+if test "`ossinfo -g|grep EXPIRED` " != " "
+then
+ echo
+ echo
+ echo
+ echo "****************************************************************"
+ echo "* NOTE! Your Open Sound System evaluation license has expired *"
+ echo "****************************************************************"
+ echo
+
+ sleep 15
+fi
+
+echo ""
+echo ""
+echo ""
+echo Open Sound System installation complete
+echo ""
+echo You can use the osstest command to test audio playback in your system.
+echo ""
+echo It may be necessary to reboot the system before all devices get properly
+echo detected by the system.
+
+exit 0