~ubuntu-branches/ubuntu/vivid/oss4/vivid

« back to all changes in this revision

Viewing changes to setup/SunOS/sbin/soundon

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis, Samuel Thibault, Romain Beauxis, Sebastien NOEL
  • Date: 2011-06-14 10:06:56 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110614100656-cx4oc7u426zn812z
Tags: 4.2-build2004-1
[ Samuel Thibault ]
* debian/control: Add liboss4-salsa2, liboss4-salsa-dev and
  liboss4-salsa-asound2 packages, equivalent to (and will replace) those from
  the oss-libsalsa package (Closes: #589127).
* debian/patches/liboss4-salsa.patch: New patch to rename libsalsa into
  liboss4-salsa to avoid conflicts in the archive for no good reason.
* debian/rules: Make in libOSSlib and libsalsa.
* debian/liboss4-salsa-dev.install, debian/liboss4-salsa2.install,
  debian/liboss4-salsa-asound2.links, debian/liboss4-salsa-dev.links:
  Install liboss4-salsa libraries like was done in the oss-libsalsa package.
* include-alsa: Add a copy of ALSA 1.0.5 headers: Cf ALSA_1.0.* symbols in
  libsalsa, this is the roughly supported version.
* debian/copyright: Update for new include-alsa files.
* alsa.pc: New file for compatibility with libasound-dev.
* debian/control:
  - Add Vcs-Browser and Vcs-Svn fields.
  - Use linux-any instead of the list of Linux archs (Closes: #604679).
  - Make dkms dependency linux-any only.
* debian/patches/hurd_iot.patch: New patch to fix soundcard.h usage in
  libsalsa on hurd-i386.
* debian/patches/libsalsa_fixes.patch: New patch to fix some printf usages
  and ioctl declaration in libsalsa.
* debian/patches/no_EBADE.patch: New patch to cope with hurd-i386 not having
  EBADE.
* debian/patches/CFLAGS.patch: New patch to make oss4 take debian/rules
  CFLAGS into account.
* debian/patches/snd_asoundlib_version.patch: New patch to add
  snd_asoundlib_version().
* debian/patches/generic_srccconf.patch: New patch to fix source
  configuration on unknown archs.

[ Romain Beauxis ]
* Fixed README.Debian to only mention dkms' modules.
* Switch to dpkg-source 3.0 (quilt) format
* Added DM-Upload-Allowed: yes

[ Sebastien NOEL ]
* New upstream release (Closes: #595298, #619272).
* Fix typo in initscript (Closes: #627149).
* debian/control: adjust linux-headers dependencies (Closes: #628879).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
case `/usr/bin/isainfo -k` in
 
4
 
 
5
i386)
 
6
        DRVPATH=/kernel/drv/
 
7
        ;;
 
8
 
 
9
amd64)
 
10
        DRVPATH=/kernel/drv/amd64/
 
11
        ;;
 
12
 
 
13
sparcv9)
 
14
        DRVPATH=/kernel/drv/sparcv9/
 
15
        ;;
 
16
 
 
17
*)
 
18
        echo Unknown architecture in soundon `isainfo -k`
 
19
esac
 
20
 
 
21
if test "`modinfo|grep OSS` " != " "
 
22
then
 
23
  echo One or more OSS modules already loaded
 
24
  modinfo|grep OSS
 
25
  exit 1
 
26
fi
 
27
 
 
28
LOG=/var/log/soundon.log
 
29
 
 
30
rm -f /dev/sndstat # Just in case Boomer is installed in the system
 
31
 
 
32
echo "Open Sound System starting" `date` > $LOG
 
33
echo "OSS version: " `cat /etc/oss/version.dat` >> $LOG 2>&1
 
34
echo Solaris version: `uname -a` >> $LOG
 
35
echo CPU: `isainfo -k` >> $LOG
 
36
 
 
37
if test "`/usr/sbin/modinfo|grep OSS` " != " "
 
38
then
 
39
        echo Warning: Some of the OSS modules were already loaded >> $LOG
 
40
        /usr/sbin/modinfo|grep OSS >> $LOG
 
41
fi
 
42
 
 
43
if test -f /etc/oss/license.asc
 
44
then
 
45
   /usr/sbin/ossdetect -l >> $LOG
 
46
fi
 
47
 
 
48
# Load osscore since it's not listed in installed_drivers file
 
49
/usr/sbin/modload $DRVPATH/osscore >> $LOG 2>&1
 
50
/usr/sbin/modinfo|grep " osscore " >> $LOG
 
51
 
 
52
if test -f /etc/oss/installed_drivers
 
53
then
 
54
 
 
55
   echo "Loading driver modules" >> $LOG
 
56
   for n in `cat /etc/oss/installed_drivers | sed 's/ .*//'`
 
57
   do
 
58
        /usr/sbin/modload $DRVPATH/$n >> $LOG 2>&1
 
59
        /usr/sbin/modinfo|grep " $n " >> $LOG
 
60
        /usr/sbin/devfsadm -i $n
 
61
   done
 
62
else
 
63
        echo /etc/oss/installed_drivers not found. >> $LOG
 
64
        echo /etc/oss/installed_drivers not found.
 
65
        exit 1
 
66
fi
 
67
 
 
68
sleep 5
 
69
echo "=========" >> $LOG
 
70
find /devices -name *_mix* > /dev/null
 
71
find /devices -name *_pcm* > /dev/null
 
72
find /devices -name *_mid* > /dev/null
 
73
/usr/sbin/devlinks
 
74
 
 
75
# Restore the legacy device links.
 
76
if test -f /etc/oss/legacy_devices
 
77
then
 
78
        sh /etc/oss/legacy_devices >> $LOG 2>&1
 
79
fi
 
80
 
 
81
echo "=========" >> $LOG
 
82
/usr/sbin/ossdevlinks -v >> $LOG 2>&1
 
83
ls -l /dev/*dsp* /dev/*_pcm* /dev/*mixer* /dev/*_mix* /dev/*midi* /dev/*_mid* >> $LOG 2>&1
 
84
echo "=========" >> $LOG
 
85
echo "OSS configuration" >> $LOG
 
86
/usr/bin/ossinfo -v3 >> $LOG 2>&1
 
87
echo "=========" >> $LOG
 
88
cat /dev/sndstat >> $LOG
 
89
 
 
90
if test -f /etc/oss/mixer.save  || test -f /etc/oss/dspdevs.map || test -f /etc/oss/applist.conf
 
91
then
 
92
        /usr/sbin/savemixer -L
 
93
fi
 
94
 
 
95
echo "=========" >> $LOG
 
96
dmesg >> $LOG
 
97
 
 
98
if grep "This OSS version has expired" /dev/sndstat > /dev/null
 
99
then
 
100
rm -f /tmp/ossmsg
 
101
cat > /tmp/ossmsg << EOM
 
102
From: "Open Sound System" <root>
 
103
To: <root>
 
104
Subject: Your Open Sound System copy has expired
 
105
 
 
106
The unregistered version of Open Sound System installed in your system
 
107
has expired. To continue using Open Sound System you need to upgrade to the
 
108
latest OSS version which is available from http://www.opensound.com/download.cgi
 
109
 
 
110
Alternatively ou can purchase the official OSS version from
 
111
http://www.opensound.com/order.html . The registered version does not
 
112
have any time limits.
 
113
 
 
114
Best regards,
 
115
 
 
116
Open Sound System Sales
 
117
sales@opensound.com
 
118
 
 
119
EOM
 
120
 
 
121
echo
 
122
echo
 
123
echo '********** IMPORTANT! *************'
 
124
echo
 
125
cat /tmp/ossmsg
 
126
 
 
127
mail root < /tmp/ossmsg
 
128
 
 
129
rm -f /tmp/ossmsg
 
130
 
 
131
fi
 
132
 
 
133
if test -x /etc/oss/soundon.user
 
134
then
 
135
  echo Running /etc/oss/soundon.user >> $LOG
 
136
  /etc/oss/soundon.user >> $LOG 2>&1
 
137
fi
 
138
 
 
139
if test "`ossinfo -g|grep TRIAL` " != " "
 
140
then
 
141
        echo
 
142
        echo "************************************************************"
 
143
        echo "* NOTE! You are using trial version of Open Sound System   *"
 
144
        echo "************************************************************"
 
145
        echo
 
146
 
 
147
        sleep 1
 
148
fi
 
149
 
 
150
if test "`ossinfo -g|grep EXPIRED` " != " "
 
151
then
 
152
        echo
 
153
        echo "****************************************************************"
 
154
        echo "* NOTE! Your Open Sound System evaluation license has expired  *"
 
155
        echo "****************************************************************"
 
156
        echo
 
157
 
 
158
        sleep 15
 
159
fi
 
160
 
 
161
exit 0