~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to setup/SCO_SV/sbin/soundoff

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
. /etc/oss.conf
 
4
 
 
5
if /sbin/modadmin -Q osscore >> /dev/null 2>&1
 
6
then
 
7
  OK=1
 
8
else
 
9
  echo OSS not loaded.
 
10
  exit 0
 
11
fi
 
12
 
 
13
if test ! -f $OSSLIBDIR/etc/installed_drivers
 
14
then
 
15
        echo $OSSLIBDIR/etc/installed_drivers is missing.
 
16
        exit 1
 
17
fi
 
18
 
 
19
# Save mixer settings automatically if requested
 
20
if test -f $OSSLIBDIR/etc/userdefs && /usr/bin/grep -q "autosave_mixer yes" $OSSLIBDIR/etc/userdefs
 
21
then
 
22
        /usr/sbin/savemixer 
 
23
fi
 
24
 
 
25
for n in `cat $OSSLIBDIR/etc/installed_drivers | sed 's/#.*//'`
 
26
do
 
27
    /sbin/modadmin -U $n > /dev/null 2>&1
 
28
done
 
29
 
 
30
/sbin/modadmin -U osscore > /dev/null 2>&1
 
31
 
 
32
if /sbin/modadmin -Q osscore >> /dev/null 2>&1
 
33
then
 
34
  OK=1
 
35
else
 
36
  exit 0
 
37
fi
 
38
 
 
39
echo Cannot unload the OSS driver modules
 
40
 
 
41
exit 0