~ubuntu-branches/ubuntu/saucy/oss-compat/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2013-06-18 15:05:31 UTC
  • Revision ID: package-import@ubuntu.com-20130618150531-r7mgs3h9c042fhyy
Tags: 3
* Use softdep directives in the modprobe configuration. (Closes:
  #660803.)
* Switch to my Debian address.
* Use canonical VCS URIs.
* Drop obsolete Lintian override for module-init-tools dependency.
* Recommend osspd, which provides OSS emulation using ALSA or PulseAudio
  (LP: #659024, #983707).
* Standards-Version 3.9.4, no further change required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
  configure)
6
6
    case "`uname -s`" in
7
7
      Linux)
8
 
        # There are three points to consider when upgrading or installing:
9
 
        #   - current versions of module-init-tools require configuration
10
 
        #     files to have a .conf suffix;
11
 
        #   - policy requires changes to configuration to be preserved
12
 
        #   - policy forbids including configuration outside of /etc
 
8
        # Pre-wheezy versions of the package shipped a symlink from
 
9
        # /etc/modprobe.d to /lib/oss-compat, so when upgrading and
 
10
        # finding a symlink we must replace the link with a copy.
 
11
        # The wheezy version of the package shipped a configuration
 
12
        # file with md5sum 88222606b0a3ba8b0825c5000c754e6f which
 
13
        # should be replaced with the new file.
 
14
        # Anything else must be left alone (policy requires changes
 
15
        # to configuration to be preserved).
13
16
        curconffile=/etc/modprobe.d/oss-compat.conf
14
17
        oldconffile=/etc/modprobe.d/oss-compat
15
18
        if [ ! -f ${curconffile} -o -L ${curconffile} ]; then
16
19
          if [ -L ${curconffile} ]; then
17
 
            # Upgrading from previous testing/unstable version
 
20
            # Upgrading from .conf link
18
21
            curlinktgt=$(readlink -f ${curconffile})
19
22
            rm -f ${curconffile}
20
23
            cp ${curlinktgt} ${curconffile}
21
24
          elif [ -L ${oldconffile} ]; then
22
 
            # Upgrading from stable, link
 
25
            # Upgrading from extension-less link
23
26
            curlinktgt=$(readlink -f ${oldconffile})
24
27
            cp ${curlinktgt} ${curconffile}
25
28
          elif [ -f ${oldconffile} ]; then
26
 
            # Upgrading from stable, file
 
29
            # Upgrading from extension-less file
27
30
            cp ${oldconffile} ${curconffile}
28
31
          else
29
32
            # Installing from scratch
30
33
            cp /lib/oss-compat/linux ${curconffile}
31
34
          fi
32
35
        fi
33
 
        # Cleanup stable configuration link
 
36
        # Cleanup extension-less configuration link
34
37
        [ -L ${oldconffile} ] && rm -f ${oldconffile}
 
38
        # Wheezy configuration file (using install directives)
 
39
        [ -f ${curconffile} ] && [ "$(md5sum ${curconffile} | cut -d\  -f1)" = "88222606b0a3ba8b0825c5000c754e6f" ] && cp /lib/oss-compat/linux ${curconffile}
35
40
 
36
41
        if lsmod | grep -q "^snd " ; then
37
42
          modprobe snd || true