2
# postinst script for plptools
4
# see: dh_installdeb(1)
7
. /usr/share/debconf/confmodule
9
# summary of how this script can be called:
10
# * <postinst> `configure' <most-recently-configured-version>
11
# * <old-postinst> `abort-upgrade' <new version>
12
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
14
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15
# <failed-install-package> <version> `removing'
16
# <conflicting-package> <version>
17
# for details, see /usr/share/doc/packaging-manual/
19
# quoting from the policy:
20
# Any necessary prompting should almost always be confined to the
21
# post-installation script, and should be protected with a conditional
22
# so that unnecessary prompting doesn't happen if a package's
23
# installation fails and the `postinst' is called with `abort-upgrade',
24
# `abort-remove' or `abort-deconfigure'.
35
db_get plptools/ncpd/start
36
if [ "$RET" = "true" ] ; then
38
db_get plptools/ncpd/serial
39
if [ "$RET" != "/dev/ttyS0" ] ; then
40
NCPD_ARGS="$NCPD_ARGS -s $RET"
42
db_get plptools/ncpd/listenat
49
NCPD_ARGS="$NCPD_ARGS -p $RET"
53
db_get plptools/frontends/remoteaddr
64
db_get plptools/plpnfsd/start
65
if [ "$RET" = "true" ] ; then
69
db_get plptools/plpprintd/start
70
if [ "$RET" = "true" ] ; then
72
PLPPRINTD_ARGS="$FREM"
73
db_get plptools/plpprintd/printqueue
74
if [ "$RET" != "psion" ] ; then
75
PLPPRINTD_ARGS="$PLPPRINTD_ARGS -s \"lpr -P$RET\""
78
cp /etc/plptools.conf /etc/plptools.conf.$$
79
cat /etc/plptools.conf.$$ | sed \
80
-e "s@START_NCPD=.*@START_NCPD=$START_NCPD@" \
81
-e "s@START_PLPNFSD=.*@START_PLPNFSD=$START_PLPNFSD@" \
82
-e "s@START_PLPPRINTD=.*@START_PLPPRINTD=$START_PLPPRINTD@" \
83
-e "s@NCPD_ARGS=.*@NCPD_ARGS=\"$NCPD_ARGS\"@" \
84
-e "s@PLPNFSD_ARGS=.*@PLPNFSD_ARGS=\"$PLPNFSD_ARGS\"@" \
85
-e "s@PLPPRINTD_ARGS=.*@PLPPRINTD_ARGS=\"$PLPPRINTD_ARGS\"@" \
86
> /etc/plptools.conf \
87
&& rm -f /etc/plptools.conf.$$ \
88
|| mv /etc/plptools.conf.$$ /etc/plptools.conf || :
89
db_get plptools/plpnfsd/suid
90
if [ "$RET" = "true" ] ; then
91
chmod u+s /usr/sbin/plpnfsd
93
chmod u-s /usr/sbin/plpnfsd
97
abort-upgrade|abort-remove|abort-deconfigure)
101
echo "postinst called with unknown argument \`$1'" >&2
106
# dh_installdeb will replace this with shell code automatically
107
# generated by other debhelper scripts.