This file is indexed.

postinst is in xringd 1.20-25.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
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

if [ "$1" = configure ]; then
	db_get xringd/modem-device 
	if [ ! -f /etc/xringd.conf -a "echo "$RET" | grep -Eq '(tty|modem)'" ]; then
			cat /usr/share/xringd/xringd.conf | sed "s&/dev/ttyS0&$RET&" > /etc/xringd.conf
	else
		MODDEV=`grep -E '^-m ' /etc/xringd.conf | cut -d\  -f2`
		if [ "$RET" != "$MODDEV" -a "echo "$RET" | grep -Eq '(tty|modem)'" ]; then
				TMPFILE=`/bin/mktemp /tmp/$p.XXXXXX`
				cat /etc/xringd.conf | \
				sed "s@^-m.*$MODDEV@-m $RET@" > $TMPFILE 
				mv /etc/xringd.conf /etc/xringd.conf.bak
				mv $TMPFILE /etc/xringd.conf
		fi
	fi
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/xringd" ]; then
	update-rc.d xringd defaults >/dev/null
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d xringd start || exit $?
	else
		/etc/init.d/xringd start || exit $?
	fi
fi
# End automatically added section