~ubuntu-branches/ubuntu/wily/oss4/wily

« back to all changes in this revision

Viewing changes to setup/FreeBSD/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
if test -f /etc/oss.conf
 
4
then
 
5
  . /etc/oss.conf
 
6
else
 
7
  OSSLIBDIR=/usr/lib/oss
 
8
fi
 
9
 
 
10
LOG=/var/log/soundon.log
 
11
echo "Open Sound System starting" `date` > $LOG
 
12
echo "OSS version: " `cat $OSSLIBDIR/version.dat` >> $LOG 2>&1
 
13
echo "Kernel version: " `uname -a` >> $LOG
 
14
 
 
15
if ! test -f $OSSLIBDIR/etc/installed_drivers
 
16
then
 
17
        echo No $OSSLIBDIR/etc/installed_drivers >> $LOG
 
18
        echo No $OSSLIBDIR/etc/installed_drivers
 
19
        echo Please run ossdetect to create it.
 
20
        exit 1
 
21
fi
 
22
 
 
23
if ! test -f $OSSLIBDIR/modules/osscore.ko
 
24
then
 
25
        echo No $OSSLIBDIR/modules/osscore.ko module >> $LOG
 
26
        echo No $OSSLIBDIR/modules/osscore.ko module
 
27
        exit 2
 
28
fi
 
29
 
 
30
if test -f $OSSLIBDIR/etc/license.asc
 
31
then
 
32
   /usr/sbin/ossdetect -l >> $LOG
 
33
fi
 
34
 
 
35
OPTIONS=
 
36
if test -f $OSSLIBDIR/conf/osscore.conf
 
37
then
 
38
        OPTIONS=`grep -v -h '^#' $OSSLIBDIR/conf/osscore.conf | sed 's/[ ]//g'`
 
39
        if test "$OPTIONS " != " "
 
40
        then
 
41
                 echo $OPTIONS | xargs -I % kenv osscore.%
 
42
        fi
 
43
fi
 
44
 
 
45
if ! /sbin/kldload $OSSLIBDIR/modules/osscore.ko
 
46
then
 
47
        echo Loading the osscore module failed
 
48
        echo Loading the osscore module failed >> $LOG
 
49
        dmesg >> $LOG
 
50
        exit 4
 
51
fi
 
52
 
 
53
for n in `cat $OSSLIBDIR/etc/installed_drivers | sed 's/#.*//'`
 
54
do
 
55
        OPTIONS=
 
56
        if test -f $OSSLIBDIR/conf/$n.conf
 
57
        then
 
58
                OPTIONS=`grep -v -h '^#' $OSSLIBDIR/conf/$n.conf | sed 's/[ ]//g'`
 
59
                if test "$OPTIONS " != " "
 
60
                then
 
61
                         echo $OPTIONS | xargs -I % kenv $n.%
 
62
                fi
 
63
        fi
 
64
 
 
65
        if ! /sbin/kldload $OSSLIBDIR/modules/$n.ko
 
66
        then
 
67
                echo Loading module $n failed '-' ignored >> $LOG
 
68
                echo Loading module $n failed '-' ignored
 
69
        fi
 
70
done
 
71
 
 
72
echo "+++ ossinfo -v3 +++" >> $LOG
 
73
/usr/bin/ossinfo -v3 >> $LOG 2>&1
 
74
echo "+++ /dev/sndstat +++" >> $LOG
 
75
cat /dev/sndstat >> $LOG 2>&1
 
76
echo "+++ dmesg +++" >> $LOG
 
77
dmesg >> $LOG
 
78
echo "+++ pciconf +++" >> $LOG
 
79
/usr/sbin/pciconf -l -v >> $LOG 2>&1
 
80
echo "+++ OSS devices +++" >> $LOG
 
81
 
 
82
# Restore the previous legacy device links
 
83
if test -f $OSSLIBDIR/etc/legacy_devices
 
84
then
 
85
        sh $OSSLIBDIR/etc/legacy_devices >> $LOG 2>&1
 
86
fi
 
87
 
 
88
/usr/sbin/ossdevlinks -v >> $LOG 2>&1
 
89
 
 
90
ls -l /dev/dsp* /dev/sndstat /dev/mixer* /dev/oss/*/* >> $LOG 2>&1
 
91
 
 
92
/usr/sbin/savemixer -L -v >> $LOG 2>&1
 
93
 
 
94
if test -x $OSSLIBDIR/soundon.user
 
95
then
 
96
  echo Running $OSSLIBDIR/soundon.user >> $LOG
 
97
  $OSSLIBDIR/soundon.user >> $LOG 2>&1
 
98
fi
 
99
 
 
100
if test "`ossinfo -g|grep TRIAL` " != " "
 
101
then
 
102
        echo
 
103
        echo "************************************************************"
 
104
        echo "* NOTE! You are using trial version of Open Sound System   *"
 
105
        echo "************************************************************"
 
106
        echo
 
107
 
 
108
        sleep 1
 
109
fi
 
110
 
 
111
if test "`ossinfo -g|grep EXPIRED` " != " "
 
112
then
 
113
        echo
 
114
        echo "****************************************************************"
 
115
        echo "* NOTE! Your Open Sound System evaluation license has expired  *"
 
116
        echo "****************************************************************"
 
117
        echo
 
118
 
 
119
        sleep 15
 
120
fi
 
121
 
 
122
exit 0