summaryrefslogtreecommitdiff
path: root/setup/SCO_SV/combpkg/postinstall
blob: c49de2e6a810368bf642028f6c5c0fd0263bb5b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/sh

# Place the uw/osr6 specific files into place
if [ -n "`echo $CLASSES | grep osr6`" ]; then
	PRFX="osr6"
else
	PRFX="uw7"
fi
while read file
do
	removef oss ${file}.${PRFX}
	mv ${file}.${PRFX} ${file}
	installf -c none oss ${file} f
done <<!EOF
	/usr/bin/ossxmix
!EOF
removef -f oss
installf -f oss

. /etc/oss.conf

echo "Setting up Open Sound System....please wait"

#first remove the SCO ich driver from the system
/etc/conf/bin/idinstall -d ich > /dev/null 2>&1

#Remove orphaned files left from earlier OSS installations
rm -f /dev/sequencer /dev/music
rm -f /dev/*_mixer[0-9]*
rm -f /dev/*_midi[0-9]*
rm -f /dev/*_dsp[0-9]*
rm -f /dev/dsp*
rm -f /dev/mixer*
rm -f /dev/midi*
rm -f /etc/rc3.d/S99oss

# Unload previous modules
for n in `ls $OSSLIBDIR/modules|grep -v osscore`
do
  modadmin -U $n > /dev/null 2>&1
done

modadmin -U osscore > /dev/null 2>&1

# Remove previous OSS startup files
rm -f /etc/rc3.d/S99oss /etc/init.d/oss

# (re)install osscore

rm -f $OSSLIBDIR/modules/*/install.log

cd $OSSLIBDIR/modules/osscore

cd $OSSLIBDIR/build && sh install.sh

if test ! -f $OSSLIBDIR/etc/userdefs
then
  echo "autosave_mixer yes" > $OSSLIBDIR/etc/userdefs
fi

/usr/sbin/soundon

installf -f oss

echo "Adding OSS startup scripts to /etc/rc2.d and /etc/init.d"
rm -f /etc/rc2.d/S89oss /etc/init.d/oss

cp $OSSLIBDIR/etc/S89oss /etc/init.d/oss
chmod 744 /etc/init.d/oss

ln -s /etc/init.d/oss /etc/rc2.d/S89oss
echo ""
echo ""
echo ""
echo ""
echo Thank you for installing Open Sound System
echo You can run 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