From e42ff8c502ea284ebeb076c58419bc768ebe8910 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 26 Mar 2008 17:49:36 +0100 Subject: [PATCH] fixes init script for non ipv6 enabled systems #472755 Signed-off-by: Pierre Habouzit --- debian/changelog | 7 +++++++ debian/xinetd.init | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index be83d77..eb52e27 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xinetd (1:2.3.14-7) unstable; urgency=low + + * Update init.d to test if ipv6 support is built in the kernel before + activating it by default (Closes: 472755). + + -- Pierre Habouzit Wed, 26 Mar 2008 17:46:54 +0100 + xinetd (1:2.3.14-6) unstable; urgency=low * Add patch from David Madore so that xinetd groks an -inetd_ipv6 mode, that diff --git a/debian/xinetd.init b/debian/xinetd.init index 6fc0db6..0f115bc 100644 --- a/debian/xinetd.init +++ b/debian/xinetd.init @@ -20,7 +20,14 @@ PIDFILE=/var/run/$NAME.pid test -x "$DAEMON" || exit 0 test -e /etc/default/$NAME && . /etc/default/$NAME -case "$INETD_COMPAT" in [Yy]*) XINETD_OPTS="$XINETD_OPTS -inetd_compat -inetd_ipv6";; esac +case "$INETD_COMPAT" in + [Yy]*) + XINETD_OPTS="$XINETD_OPTS -inetd_compat" + if perl -MSocket -e 'exit (!socket($sock, AF_INET6, SOCK_STREAM, 0))'; then + XINETD_OPTS="$XINETD_OPTS -inetd_ipv6" + fi + ;; +esac . /lib/lsb/init-functions -- 2.20.1