postinst is in xringd 1.20-27build1.
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 | #!/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=$(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/11.1.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "/etc/init.d/xringd" ]; then
update-rc.d xringd defaults >/dev/null
invoke-rc.d xringd start || exit 1
fi
fi
# End automatically added section
|