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

« back to all changes in this revision

Viewing changes to setup/SCO_SV/S89oss

  • 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
if test -f /etc/oss.conf
 
3
then
 
4
  . /etc/oss.conf
 
5
else
 
6
  OSSLIBDIR=/usr/lib/oss
 
7
fi
 
8
 
 
9
##########
 
10
#
 
11
# The first argument tells what to do.
 
12
##########
 
13
 
 
14
state=$1
 
15
 
 
16
case $state in
 
17
 
 
18
'start')
 
19
        # Signal the osscore module to forceload all the low level
 
20
        # drivers (in the right order).
 
21
 
 
22
        if test -f $OSSLIBDIR/starting
 
23
        then
 
24
           echo Previous start failed. Remove $OSSLIBDIR/starting
 
25
           echo and run soundon manually to start OSS.
 
26
           exit 1
 
27
        fi
 
28
 
 
29
        echo "Starting Open Sound System"
 
30
        /usr/sbin/soundoff > /dev/null 2>&1
 
31
        /usr/sbin/soundon
 
32
        rm -f $OSSLIBDIR/starting
 
33
        exit 0
 
34
        ;;
 
35
'stop')
 
36
        # Save mixer settings automatically if requested
 
37
        if test -f $OSSLIBDIR/etc/userdefs && grep -q "autosave_mixer yes" $OSSLIBDIR/etc/userdefs
 
38
        then
 
39
          /usr/sbin/savemixer 
 
40
        fi
 
41
        exit 0
 
42
        ;;
 
43
esac
 
44
 
 
45
exit 1
 
46