Package: tntnet
Version: 1.5.3-2
Severity: minor
Since the package tries to auto-start the tntnet server after installation,
and the default configuration has it listen on *:80, the package's postinst
script will fail since tntnet can't bind to port 80.
The attached patch modifies the initscript to require the variable
START_TNTNET_SERVER to be set to "yes" in order for the "start" action to
take effect. It also adds this variable to /etc/default/tntnet, along with
a comment regarding its usage.
I don't especially care whether the default is "yes" or "no", I just want
an easy way to disable its auto-start attempt, which also happens to
prevent the package from successfully configuring on my system (since it
has Apache listening on port 80).
One could potentially set a low-priority autoconf question to determine
what to set this value to, or use some magic with netstat to determine
if port 80 is in use or not (I'm not sure how portable and policy-compliant
that would be, though).
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Versions of packages tntnet depends on:
ii libc6 2.3.6.ds1-11 GNU C Library: Shared libraries
ii libcxxtools3 1.4.3.1-1 library of unrelated but useful C+
ii libgcc1 1:4.1.1-21 GCC support library
ii libgcrypt11 1.2.3-2 LGPL Crypto library - runtime libr
ii libgnutls13 1.4.4-3 the GNU TLS library - runtime libr
ii libgpg-error0 1.4-1 library for common error values an
ii libltdl3 1.5.22-4 A system independent dlopen wrappe
ii libstdc++6 4.1.1-21 The GNU Standard C++ Library v3
ii libtasn1-3 0.3.6-2 Manage ASN.1 structures (runtime)
ii libtntnet5 1.5.3-2 Tntnet libraries
ii zlib1g 1:1.2.3-13 compression library - runtime
tntnet recommends no packages.
-- no debconf information
diff -ru orig/default/tntnet mod/default/tntnet
--- orig/default/tntnet 2007-03-03 11:54:33.000000000 +0900
+++ mod/default/tntnet 2007-03-03 12:13:49.000000000 +0900
@@ -6,5 +6,8 @@
# This is a POSIX shell fragment
#
+# Set to "yes" to start the tntnet server
+START_TNTNET_SERVER="no"
+
# Additional options that are passed to the Daemon.
DAEMON_OPTS=""
diff -ru orig/init.d/tntnet mod/init.d/tntnet
--- orig/init.d/tntnet 2007-03-03 11:54:38.000000000 +0900
+++ mod/init.d/tntnet 2007-03-03 12:13:54.000000000 +0900
@@ -26,6 +26,11 @@
case "$1" in
start)
+ if [ z$START_TNTNET_SERVER != zyes ] ; then
+ echo "Not starting $DESC, not enabled in /etc/default/tntnet"
+ exit 0
+ fi
+
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec
$DAEMON -- $DAEMON_OPTS
echo "$NAME."