~ubuntu-branches/ubuntu/oneiric/ndiswrapper/oneiric

« back to all changes in this revision

Viewing changes to debian/ndiswrapper-utils.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2005-04-10 15:32:12 UTC
  • mfrom: (1.2.1 upstream) (3 hoary)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050410153212-eelmp2g0ym3t89f8
Tags: 1.1-4
Argh, missed a bit w/ amd64 support; it should build now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
if [ "$1" = "configure" -a ! -z "$2" ]; then
 
6
 
 
7
        # Newer versions of ndiswrapper (> 1.0rc3) expect conf files to have
 
8
        # the bustype in the file name.  So, for upgrades from older versions,
 
9
        # assume a bustype of PCI ('5'), and make appropriate symlinks.
 
10
        if dpkg --compare-versions "$2" lt "1.0-1"; then
 
11
                confs=/etc/ndiswrapper/*/*.conf
 
12
                if [ "$confs" != "$(echo $confs)" ]; then
 
13
                        for c in $confs; do
 
14
                                match=$(basename $c | grep -o ':[0-9]\+\.[0-9]\.conf' || true)
 
15
                                if [ -z "$match" ]; then
 
16
                                        ln -sf "$(basename $c)" "${c%.conf}.5.conf"
 
17
                                fi
 
18
                        done
 
19
                fi
 
20
        fi
 
21
fi
 
22
 
 
23
#DEBHELPER#
 
24
 
 
25
exit 0