This file is indexed.

postinst is in libphone-utils0 0.1+git20110523-1.

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
#!/bin/sh
# postinst script for libphone-utils

set -e

. /usr/share/debconf/confmodule

cfgpath=/etc/phone-utils.conf

cfg_prep() {
	[ -f "$cfgpath" ] || touch "$cfgpath"
	grep -q '^\[local\]' "$cfgpath" || echo '[local]' >> "$cfgpath"
}

cfg_set() {
	var="$1" val="$2" perl -i -ple '
		s/^($ENV{var})[ \t]*=.*/$1 = $ENV{val}/ and $seen++;
		print STDERR "WARNING: option \"$ENV{var}\" set multiple times!\n" if ( $seen > 1 );
		s/$/\n$ENV{var} = $ENV{val}/ if (eof and ! $seen);
	' "$cfgpath"
}

if [ "$1" = "configure" ] ; then
	cfg_prep
	db_get libphone-utils/international_prefix
	cfg_set international_prefix $RET
	db_get libphone-utils/national_prefix
	cfg_set national_prefix $RET
	db_get libphone-utils/country_code
	cfg_set country_code $RET
	db_get libphone-utils/area_code
	cfg_set area_code $RET
fi

# tell debconf we are done
db_stop;

# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
	ldconfig
fi
# End automatically added section


exit 0;