This file is indexed.

postinst is in libgcr410 2.4.0-9.2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/sh
# postinst script for libgcr410
#
# based on libgempc410.postinst
#
# see also dh_installdeb(1)

set -e

cfgdir=/etc/reader.conf.d
cfg=$cfgdir/libgcr410
lib=/usr/lib/pcsc/drivers/serial/libgcr410.so

case "$1" in 
	configure|reconfigure)
		# Source debconf library.
		. /usr/share/debconf/confmodule

		db_get 'libgcr410/port' || true
		SERIAL_PORT="$RET"

		if [ ! -d $cfgdir ] ; then
			mkdir -p $cfgdir
		fi

		rm -f $cfg
		echo >> $cfg
		echo "# Gemplus GCR410 reader" >> $cfg
		echo "# see /usr/share/doc/libgcr410/Readme" >> $cfg
		echo "FRIENDLYNAME      \"GCR410\"" >> $cfg
		echo "DEVICENAME        $SERIAL_PORT" >> $cfg
		echo "LIBPATH           $lib" >> $cfg

		case $SERIAL_PORT in
			ttyS0)
                                echo "CHANNELID         0x0103f8" >> $cfg
				;;
			ttyS1)
                                echo "CHANNELID         0x0102f8" >> $cfg
				;;
			ttyS2)
                                echo "CHANNELID         0x0103e8" >> $cfg
				;;
			ttyS3)
                                echo "CHANNELID         0x0102e8" >> $cfg
				;;
			*)
				echo "Error: serial port unknown ($SERIAL_PORT)"				;;
		esac

                # regenerate /etc/reader.conf if update-reader.conf is available
		if [ -x /usr/sbin/update-reader.conf ] ; then
                        update-reader.conf || true
                fi 

		if [ -e /dev/.devfsd ] ; then
			update-devfsd
		else
			if [ ! -d /dev/pcsc ] ; then
				echo -n "Creating /dev/pcsc/..."
				mkdir /dev/pcsc
				echo "done"
			fi

			if [ ! -e /dev/pcsc/1 -a ! -L /dev/pcsc/1 ] ; then
				echo -n "Populating /dev/pcsc/..."
				ln -s ../ttyS0 /dev/pcsc/1
				ln -s ../ttyS1 /dev/pcsc/2
				ln -s ../ttyS2 /dev/pcsc/3
				ln -s ../ttyS3 /dev/pcsc/4
			fi
		fi
		if [ -x /etc/init.d/pcscd ] ; then
			invoke-rc.d pcscd restart 3> /dev/null
		fi

		db_stop
	;;

	abort-upgrade|abort-remove|abort-deconfigure)

	;;

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

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0