blob: 79b7ca29354e282a2953d6bb2654af110a5de868 (
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
#!/bin/sh
case `/usr/bin/isainfo -k` in
i386)
DRVPATH=/kernel/drv/
;;
amd64)
DRVPATH=/kernel/drv/amd64/
;;
sparcv9)
DRVPATH=/kernel/drv/sparcv9/
;;
*)
echo Unknown architecture in soundon `isainfo -k`
esac
if test "`modinfo|grep OSS` " != " "
then
echo One or more OSS modules already loaded
modinfo|grep OSS
exit 1
fi
LOG=/var/log/soundon.log
rm -f /dev/sndstat # Just in case Boomer is installed in the system
echo "Open Sound System starting" `date` > $LOG
echo "OSS version: " `cat /etc/oss/version.dat` >> $LOG 2>&1
echo Solaris version: `uname -a` >> $LOG
echo CPU: `isainfo -k` >> $LOG
if test "`/usr/sbin/modinfo|grep OSS` " != " "
then
echo Warning: Some of the OSS modules were already loaded >> $LOG
/usr/sbin/modinfo|grep OSS >> $LOG
fi
if test -f /etc/oss/license.asc
then
/usr/sbin/ossdetect -l >> $LOG
fi
# Load osscore since it's not listed in installed_drivers file
/usr/sbin/modload $DRVPATH/osscore >> $LOG 2>&1
/usr/sbin/modinfo|grep " osscore " >> $LOG
if test -f /etc/oss/installed_drivers
then
echo "Loading driver modules" >> $LOG
for n in `cat /etc/oss/installed_drivers | sed 's/ .*//'`
do
/usr/sbin/modload $DRVPATH/$n >> $LOG 2>&1
/usr/sbin/modinfo|grep " $n " >> $LOG
/usr/sbin/devfsadm -i $n
done
else
echo /etc/oss/installed_drivers not found. >> $LOG
echo /etc/oss/installed_drivers not found.
exit 1
fi
sleep 5
echo "=========" >> $LOG
find /devices -name *_mix* > /dev/null
find /devices -name *_pcm* > /dev/null
find /devices -name *_mid* > /dev/null
/usr/sbin/devlinks
# Restore the legacy device links.
if test -f /etc/oss/legacy_devices
then
sh /etc/oss/legacy_devices >> $LOG 2>&1
fi
echo "=========" >> $LOG
/usr/sbin/ossdevlinks -v >> $LOG 2>&1
ls -l /dev/*dsp* /dev/*_pcm* /dev/*mixer* /dev/*_mix* /dev/*midi* /dev/*_mid* >> $LOG 2>&1
echo "=========" >> $LOG
echo "OSS configuration" >> $LOG
/usr/bin/ossinfo -v3 >> $LOG 2>&1
echo "=========" >> $LOG
cat /dev/sndstat >> $LOG
if test -f /etc/oss/mixer.save || test -f /etc/oss/dspdevs.map || test -f /etc/oss/applist.conf
then
/usr/sbin/savemixer -L
fi
echo "=========" >> $LOG
dmesg >> $LOG
if grep "This OSS version has expired" /dev/sndstat > /dev/null
then
rm -f /tmp/ossmsg
cat > /tmp/ossmsg << EOM
From: "Open Sound System" <root>
To: <root>
Subject: Your Open Sound System copy has expired
The unregistered version of Open Sound System installed in your system
has expired. To continue using Open Sound System you need to upgrade to the
latest OSS version which is available from http://www.opensound.com/download.cgi
Alternatively ou can purchase the official OSS version from
http://www.opensound.com/order.html . The registered version does not
have any time limits.
Best regards,
Open Sound System Sales
sales@opensound.com
EOM
echo
echo
echo '********** IMPORTANT! *************'
echo
cat /tmp/ossmsg
mail root < /tmp/ossmsg
rm -f /tmp/ossmsg
fi
if test -x /etc/oss/soundon.user
then
echo Running /etc/oss/soundon.user >> $LOG
/etc/oss/soundon.user >> $LOG 2>&1
fi
if test "`ossinfo -g|grep TRIAL` " != " "
then
echo
echo "************************************************************"
echo "* NOTE! You are using trial version of Open Sound System *"
echo "************************************************************"
echo
sleep 1
fi
if test "`ossinfo -g|grep EXPIRED` " != " "
then
echo
echo "****************************************************************"
echo "* NOTE! Your Open Sound System evaluation license has expired *"
echo "****************************************************************"
echo
sleep 15
fi
exit 0
|