~ubuntu-branches/ubuntu/intrepid/nvidia-graphics-drivers-173/intrepid-updates

« back to all changes in this revision

Viewing changes to debian.binary/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Milone (tseliot)
  • Date: 2008-07-08 18:49:59 UTC
  • Revision ID: james.westby@ubuntu.com-20080708184959-drt529omgps772ol
Tags: upstream-173.14.09
ImportĀ upstreamĀ versionĀ 173.14.09

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# postinst script for nvidia-kernel
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -e
 
7
 
 
8
# summary of how this script can be called:
 
9
#        * <postinst> `configure' <most-recently-configured-version>
 
10
#        * <old-postinst> `abort-upgrade' <new version>
 
11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 
12
#          <new-version>
 
13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 
14
#          <failed-install-package> <version> `removing'
 
15
#          <conflicting-package> <version>
 
16
# for details, see /usr/share/doc/packaging-manual/
 
17
#
 
18
# quoting from the policy:
 
19
#     Any necessary prompting should almost always be confined to the
 
20
#     post-installation script, and should be protected with a conditional
 
21
#     so that unnecessary prompting doesn't happen if a package's
 
22
#     installation fails and the `postinst' is called with `abort-upgrade',
 
23
#     `abort-remove' or `abort-deconfigure'.
 
24
 
 
25
 
 
26
 
 
27
case "$1" in
 
28
    configure)
 
29
        major=195
 
30
        
 
31
        if [ ! -f /dev/.devfsd ] ; then
 
32
        
 
33
                for i in 0 1 2 3; do
 
34
                        devfile="/dev/nvidia$i"
 
35
                        if [ ! -c "$devfile" ]; then
 
36
                                mknod $devfile c $major $i
 
37
                                chown root:video $devfile
 
38
                                chmod 0660 $devfile
 
39
                        fi
 
40
                done
 
41
 
 
42
                devfile=/dev/nvidiactl
 
43
      
 
44
                if [ ! -c "$devfile" ]; then
 
45
                        mknod $devfile c $major 255
 
46
                        chown root:video $devfile
 
47
                        chmod 0660 $devfile
 
48
                fi
 
49
        fi
 
50
        if [ -x /usr/sbin/update-devfsd ] ; then
 
51
                /usr/sbin/update-devfsd 
 
52
        fi
 
53
        
 
54
;;
 
55
 
 
56
    abort-upgrade|abort-remove|abort-deconfigure)
 
57
 
 
58
    ;;
 
59
 
 
60
    *)
 
61
        echo "postinst called with unknown argument \`$1'" >&2
 
62
        exit 0
 
63
    ;;
 
64
esac
 
65
 
 
66
 
 
67
 
 
68
 
 
69
 
 
70
 
 
71
# dh_installdeb will replace this with shell code automatically
 
72
# generated by other debhelper scripts.
 
73
 
 
74
#DEBHELPER#
 
75
 
 
76
exit 0
 
77
 
 
78