File: postinst

package info (click to toggle)
dtlk 1.12-7
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 196 kB
  • ctags: 89
  • sloc: ansic: 703; sh: 204; makefile: 100
file content (60 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh

set -e

case "$1" in
    configure)
        # continue below
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
        exit 0;
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2;
        exit 0;
    ;;
esac

# tell modprobe to create device file after loading module
if grep dtlk /etc/conf.modules > /dev/null 2>&1
then
    true
else
    cat >> /etc/conf.modules <<EOF

post-install dtlk /dev/MAKEDEV dtlk
EOF
fi

# this should already be included in makedev package
## tell /dev/MAKEDEV to get device number from the module,
## and assign to group "audio"
#if grep dtlk /etc/devinfo > /dev/null 2>&1
#then
#    true
#else
#    cat >> /etc/devinfo <<EOF
#
#char (dtlk=dtlk) dtlk (audio) : 0  /* doubletalk */
#EOF
#fi
#
## add dtlk to list of modules to install at boot time
if grep dtlk /etc/modules > /dev/null 2>&1
then
    true
else
    cat >> /etc/modules <<EOF
dtlk
EOF

depmod -a

fi

# install header file if directory is available
if [ -d /usr/include/linux -o -L /usr/include/linux ]; then
    cp /usr/doc/dtlk/dtlk.h /usr/include/linux;
fi