aboutsummaryrefslogtreecommitdiffstats
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
parentc8a7865a8e29fa276213c26aab948976b3a22469 (diff)
downloadplptools-fc4a92ad209a004b3dc1ba19c086943832174909.tar.gz
plptools-fc4a92ad209a004b3dc1ba19c086943832174909.tar.bz2
plptools-fc4a92ad209a004b3dc1ba19c086943832174909.zip
- More elaborated debian config
-rw-r--r--debian/control2
-rw-r--r--debian/plptools.config47
-rw-r--r--debian/plptools.postinst67
-rw-r--r--debian/plptools.templates76
-rw-r--r--po/de.po18
-rw-r--r--po/sv.po18
6 files changed, 201 insertions, 27 deletions
diff --git a/debian/control b/debian/control
index e118c0f..db567d7 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.5.6.1
Package: plptools
Architecture: any
-Depends: ${shlibs:Depends}, debconf
+Depends: ${shlibs:Depends}, debconf (>= 1.0)
Description: Access a Psion PDA over a serial link
This package lets you access Psion drives over a serial link. You
can mount them, pseudo NFS style, access them FTP-like, use a local
diff --git a/debian/plptools.config b/debian/plptools.config
index 6fe411f..8c2b002 100644
--- a/debian/plptools.config
+++ b/debian/plptools.config
@@ -4,8 +4,51 @@ set -e
# Use debconf baby
. /usr/share/debconf/confmodule
-# minimalistic for now ;-)
-db_text medium plptools/customize || true
+db_input medium plptools/ncpd/start || true
db_go
+db_get plptools/ncpd/start
+if [ "$RET" = "true" ] ; then
+ db_input medium plptools/ncpd/serial || true
+ db_go
+ db_input medium plptools/ncpd/listenat || true
+ db_go
+ db_get plptools/ncpd/listenat
+ SEENREM=false
+ case "$RET" in
+ 0.0.0.0)
+ ;;
+ 127.0.0.1)
+ ;;
+ 0.0.0.0:7501)
+ ;;
+ 127.0.0.1:7501)
+ ;;
+ *)
+ SEENREM=true
+ db_set plptools/frontends/remoteaddr "$RET"
+ esac
+ db_fset plptools/frontends/remoteaddr seen $SEENREM
+else
+ db_fset plptools/frontends/remoteaddr seen false
+fi
+
+db_input medium plptools/plpnfsd/start || true
+db_go
+db_input medium plptools/plpnfsd/suid || true
+db_go
+
+db_input medium plptools/plpprintd/start || true
+db_go
+db_get plptools/plpprintd/start
+if [ "$RET" = "true" ] ; then
+ db_input medium plptools/plpprintd/printqueue || true
+ db_go
+fi
+
+db_get plptools/ncpd/start
+if [ "$RET" = "false" ] ; then
+ db_input medium plptools/frontends/remoteaddr || true
+ db_go
+fi
exit 0
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)
diff --git a/debian/plptools.templates b/debian/plptools.templates
index 01232e0..dfa0b7f 100644
--- a/debian/plptools.templates
+++ b/debian/plptools.templates
@@ -9,12 +9,72 @@ Description: Customize /etc/plptools.conf
.
Both daemons are disabled by default. You can enable them by editing
/etc/plptools.conf.
-Description-de: Anpassung von /etc/plptools.conf
- Zusätzlich zum Haupt-Daemon "ncpd", stellt das Packet plptools zwei
- optionale Daemonen zur Verfügung:
+
+Template: plptools/ncpd/start
+Type: boolean
+Default: true
+Description: Should ncpd being started during boot?
+ Normally, ncpd - the daemon which handles the serial connection to a
+ Psion - is started on boot-up. If you intend to connect your Psion to
+ another machine on the net and NEVER will use it locally, you can
+ disable this here.
+
+Template: plptools/ncpd/serial
+Type: string
+Default: /dev/ttyS0
+Description: Specify serial line to be used
+ By default, the Psion is expected to be connected to the first serial
+ line (COM1:) of your machine. You can change this here.
+
+Template: plptools/ncpd/listenat
+Type: string
+Default: 127.0.0.1
+Description: Specify the IP address and port for ncpd
+ If you intend to use the plptools front-ends from other machines, you
+ can specify 0.0.0.0 or the IP address of your machine here. Normal
+ users should keep the default 127.0.0.1!
.
- plpnfsd (zum Einhängen von Psion-Laufwerken - ähnlich wie NFS)
- plpprintd (zum Drucken via PC von einem Psion Serie 5)
- .
- Beide Daemonen sind standardmäßig abgeschaltet. Sie können aktiviert weden,
- indem die Datei /etc/plptools.conf editiert wird.
+ Note, that THIS IS A SECURITY THREAT as no authentication and no
+ encryption is used! DO NOT USE THIS on machines which are accessible
+ from the Internet!
+
+Template: plptools/plpnfsd/start
+Type: boolean
+Default: false
+Description: Should plpnfsd being started during boot?
+ If plpnfsd is started during boot-up, it will wait for a Psion being
+ connected and then automatically mount that Psion. Since this is
+ done as root, non-privileged users will not have access to the
+ mounted directory. If you have a single-user machine, you probably
+ want to start plpnfsd manually when you need it.
+
+Template: plptools/plpnfsd/suid
+Type: boolean
+Default: false
+Description: Set SUID-root bit of plpnfsd?
+ For convenience on a single-user machine, plpnfsd can be installed with
+ the setuid bit enabled. This allows any local user to mount and unmount
+ a connected Psion. Be warned, that THIS IS A SECURITY THREAT to your
+ machine. NEVER ENABLE THIS ON A MULTIUSER MACHINE.
+
+Template: plptools/plpprintd/start
+Type: boolean
+Default: false
+Description: Should plpprintd being started during boot?
+ If you intend to use the Psion's "Print via PC" feature, you can
+ enable this option. You must have a working print queue which
+ is capable of printing Postscript in order to use this feature.
+
+Template: plptools/plpprintd/printqueue
+Type: string
+Default: psion
+Description: Specify the print queue to be used
+ Please enter the name of the print queue you want to use for
+ printing from the Psion.
+
+Template: plptools/frontends/remoteaddr
+Type: string
+Description: Specify remote host to be contacted
+ Since you have ncpd either disabled or listening on a non-standard
+ address, you should specify the address for the frontents again.
+
diff --git a/po/de.po b/po/de.po
index 71e9e57..1b1ecb9 100644
--- a/po/de.po
+++ b/po/de.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: plptools 0.11\n"
-"POT-Creation-Date: 2003-02-01 00:01+0100\n"
+"POT-Creation-Date: 2003-02-03 16:20+0100\n"
"PO-Revision-Date: 2002-07-16 21:39 CET\n"
"Last-Translator: Fritz Elfert <felfert@to.com>\n"
"Language-Team: Deutsch <de@li.org>\n"
@@ -14,7 +14,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
-#: lib/rfsv.cc:33 lib/rpcsfactory.cc:43 lib/rfsvfactory.cc:45
+#: lib/rfsv.cc:33 lib/rfsvfactory.cc:45 lib/rpcsfactory.cc:43
msgid "no error"
msgstr "kein Fehler"
@@ -467,11 +467,13 @@ msgid "New Zealand"
msgstr "Neuseeländisch"
# FIXME: not shure about ISO code
+#. FIXME: not shure about ISO code
#: lib/rpcs.cc:90
msgid "International French"
msgstr "Internationales Französisch"
# FIXME: not shure about ISO code
+#. FIXME: not shure about ISO code
#: lib/rpcs.cc:91
msgid "Czech"
msgstr "Tschechisch"
@@ -528,23 +530,23 @@ msgstr " Sekunden"
msgid " second"
msgstr " Sekunde"
-#: lib/rpcsfactory.cc:44 lib/rfsvfactory.cc:46
+#: lib/rfsvfactory.cc:46 lib/rpcsfactory.cc:44
msgid "could not send version request"
msgstr "Konnte Versions-Anforderung nicht versenden"
-#: lib/rpcsfactory.cc:45 lib/rfsvfactory.cc:47
+#: lib/rfsvfactory.cc:47 lib/rpcsfactory.cc:45
msgid "try again"
msgstr "Erneut versuchen"
-#: lib/rpcsfactory.cc:46 lib/rfsvfactory.cc:48
+#: lib/rfsvfactory.cc:48 lib/rpcsfactory.cc:46
msgid "no psion connected"
msgstr "Kein Psion angeschlossen"
-#: lib/rpcsfactory.cc:47 lib/rfsvfactory.cc:49
+#: lib/rfsvfactory.cc:49 lib/rpcsfactory.cc:47
msgid "wrong protocol version"
msgstr "Falsche Protokoll-Version"
-#: lib/rpcsfactory.cc:48 lib/rfsvfactory.cc:50
+#: lib/rfsvfactory.cc:50 lib/rpcsfactory.cc:48
msgid "no response from ncpd"
msgstr "Keine Antwort vom ncpd"
@@ -1034,7 +1036,7 @@ msgstr "Behalte ursprünglichen Ordner \""
msgid "Transfer complete, ("
msgstr "Ãœbertragung abgeschlossen, ("
-#: plpftp/ftp.cc:578 plpftp/ftp.cc:669 plpbackup/plpbackup.cc:1202
+#: plpbackup/plpbackup.cc:1202 plpftp/ftp.cc:578 plpftp/ftp.cc:669
msgid " bytes in "
msgstr " Bytes in "
diff --git a/po/sv.po b/po/sv.po
index ae88c15..60fba7c 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: plptools 0.11\n"
-"POT-Creation-Date: 2003-02-01 00:01+0100\n"
+"POT-Creation-Date: 2003-02-03 16:20+0100\n"
"PO-Revision-Date: 2002-07-11 09:10+0200\n"
"Last-Translator: Daniel Brahneborg <basic@chello.se>\n"
"Language-Team: SWEDISH <SE@li.org>\n"
@@ -13,7 +13,7 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: lib/rfsv.cc:33 lib/rpcsfactory.cc:43 lib/rfsvfactory.cc:45
+#: lib/rfsv.cc:33 lib/rfsvfactory.cc:45 lib/rpcsfactory.cc:43
msgid "no error"
msgstr "inget fel"
@@ -466,11 +466,13 @@ msgid "New Zealand"
msgstr "Nya Zeeländska"
# FIXME: not shure about ISO code
+#. FIXME: not shure about ISO code
#: lib/rpcs.cc:90
msgid "International French"
msgstr "Internationell Franska"
# FIXME: not shure about ISO code
+#. FIXME: not shure about ISO code
#: lib/rpcs.cc:91
msgid "Czech"
msgstr "Tjeckoslovakiska"
@@ -527,23 +529,23 @@ msgstr " sekunder"
msgid " second"
msgstr " sekund"
-#: lib/rpcsfactory.cc:44 lib/rfsvfactory.cc:46
+#: lib/rfsvfactory.cc:46 lib/rpcsfactory.cc:44
msgid "could not send version request"
msgstr "kunde inte skicka versionsfråga"
-#: lib/rpcsfactory.cc:45 lib/rfsvfactory.cc:47
+#: lib/rfsvfactory.cc:47 lib/rpcsfactory.cc:45
msgid "try again"
msgstr "försök igen"
-#: lib/rpcsfactory.cc:46 lib/rfsvfactory.cc:48
+#: lib/rfsvfactory.cc:48 lib/rpcsfactory.cc:46
msgid "no psion connected"
msgstr "ingen psion ikopplad"
-#: lib/rpcsfactory.cc:47 lib/rfsvfactory.cc:49
+#: lib/rfsvfactory.cc:49 lib/rpcsfactory.cc:47
msgid "wrong protocol version"
msgstr "fel protokollversion"
-#: lib/rpcsfactory.cc:48 lib/rfsvfactory.cc:50
+#: lib/rfsvfactory.cc:50 lib/rpcsfactory.cc:48
msgid "no response from ncpd"
msgstr "inget svar från ncpd"
@@ -1035,7 +1037,7 @@ msgstr "Behåller ursprungsmappen \""
msgid "Transfer complete, ("
msgstr "Överfringen klar, ("
-#: plpftp/ftp.cc:578 plpftp/ftp.cc:669 plpbackup/plpbackup.cc:1202
+#: plpbackup/plpbackup.cc:1202 plpftp/ftp.cc:578 plpftp/ftp.cc:669
msgid " bytes in "
msgstr " bytes på "