From: Pierre Habouzit Date: Wed, 26 Mar 2008 16:49:36 +0000 (+0100) Subject: fixes init script for non ipv6 enabled systems #472755 X-Git-Tag: debian-sid/2.3.14-7^0 X-Git-Url: http://git.madism.org/?p=packages%2Fxinetd.git;a=commitdiff_plain;h=e42ff8c502ea284ebeb076c58419bc768ebe8910 fixes init script for non ipv6 enabled systems #472755 Signed-off-by: Pierre Habouzit --- 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