aboutsummaryrefslogtreecommitdiffstats
path: root/debian/plptools.postinst
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2003-02-03 22:17:11 +0000
committerFritz Elfert <felfert@to.com>2003-02-03 22:17:11 +0000
commitfc4a92ad209a004b3dc1ba19c086943832174909 (patch)
tree114d0ead918887b78f4cc80d1944962fc3d2fffe /debian/plptools.postinst
parentc8a7865a8e29fa276213c26aab948976b3a22469 (diff)
downloadplptools-fc4a92ad209a004b3dc1ba19c086943832174909.tar.gz
plptools-fc4a92ad209a004b3dc1ba19c086943832174909.tar.bz2
plptools-fc4a92ad209a004b3dc1ba19c086943832174909.zip
- More elaborated debian config
Diffstat (limited to 'debian/plptools.postinst')
-rw-r--r--debian/plptools.postinst67
1 files changed, 67 insertions, 0 deletions
diff --git a/debian/plptools.postinst b/debian/plptools.postinst
index 6b5db45..97c6825 100644
--- a/debian/plptools.postinst
+++ b/debian/plptools.postinst
@@ -25,6 +25,73 @@ set -e
case "$1" in
configure)
+ START_NCPD=no
+ START_PLPNFSD=no
+ START_PLPPRINTD=no
+ NCPD_ARGS=
+ PLPNFSD_ARGS=
+ PLPPRINTD_ARGS=
+ FREM=
+ db_get plptools/ncpd/start
+ if [ "$RET" = "true" ] ; then
+ START_NCPD=yes
+ db_get plptools/ncpd/serial
+ if [ "$RET" != "/dev/ttyS0" ] ; then
+ NCPD_ARGS="$NCPD_ARGS -s $RET"
+ fi
+ db_get plptools/ncpd/listenat
+ case "$RET" in
+ 127.0.0.1)
+ ;;
+ 127.0.0.1:7501)
+ ;;
+ *)
+ NCPD_ARGS="$NCPD_ARGS -p $RET"
+ ;;
+ esac
+ else
+ db_get plptools/frontends/remoteaddr
+ case "$RET" in
+ 127.0.0.1)
+ ;;
+ 127.0.0.1:7501)
+ ;;
+ *)
+ FREM="-p $RET"
+ ;;
+ esac
+ fi
+ db_get plptools/plpnfsd/start
+ if [ "$RET" = "true" ] ; then
+ START_PLPNFSD=yes
+ PLPNFSD_ARGS="$FREM"
+ fi
+ db_get plptools/plpprintd/start
+ if [ "$RET" = "true" ] ; then
+ START_PLPPRINTD=yes
+ PLPPRINTD_ARGS="$FREM"
+ db_get plptools/plpprintd/printqueue
+ if [ "$RET" != "psion" ] ; then
+ PLPPRINTD_ARGS="$PLPPRINTD_ARGS -s \"lpr -P$RET\""
+ fi
+ fi
+ cp /etc/plptools.conf /etc/plptools.conf.$$
+ cat /etc/plptools.conf.$$ | sed \
+ -e "s@START_NCPD=.*@START_NCPD=$START_NCPD@" \
+ -e "s@START_PLPNFSD=.*@START_PLPNFSD=$START_PLPNFSD@" \
+ -e "s@START_PLPPRINTD=.*@START_PLPPRINTD=$START_PLPPRINTD@" \
+ -e "s@NCPD_ARGS=.*@NCPD_ARGS=\"$NCPD_ARGS\"@" \
+ -e "s@PLPNFSD_ARGS=.*@PLPNFSD_ARGS=\"$PLPNFSD_ARGS\"@" \
+ -e "s@PLPPRINTD_ARGS=.*@PLPPRINTD_ARGS=\"$PLPPRINTD_ARGS\"@" \
+ > /etc/plptools.conf \
+ && rm -f /etc/plptools.conf.$$ \
+ || mv /etc/plptools.conf.$$ /etc/plptools.conf || :
+ db_get plptools/plpnfsd/suid
+ if [ "$RET" = "true" ] ; then
+ chmod u+s /usr/sbin/plpnfsd
+ else
+ chmod u-s /usr/sbin/plpnfsd
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)