From MAILER-DAEMON Tue Dec 29 07:55:41 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aDtoT-0006bE-B2
	for mharc-commit-inetutils@gnu.org; Tue, 29 Dec 2015 07:55:41 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60885)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1aDtoQ-0006b2-Ny
	for commit-inetutils@gnu.org; Tue, 29 Dec 2015 07:55:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1aDtoP-0003IQ-Kr
	for commit-inetutils@gnu.org; Tue, 29 Dec 2015 07:55:38 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:53490)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1aDtoP-0003IM-Fl
	for commit-inetutils@gnu.org; Tue, 29 Dec 2015 07:55:37 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1aDtoO-0007oz-4k
	for commit-inetutils@gnu.org; Tue, 29 Dec 2015 12:55:36 +0000
Date: Tue, 29 Dec 2015 12:55:36 +0000
Message-Id: <E1aDtoO-0007oz-4k@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_4-16-ge686195
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7adcd01d96ac8f9077d32f214c85c0d8ef866308
X-Git-Newrev: e686195a0259075b12df1313388ade7c58628f28
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Dec 2015 12:55:39 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  e686195a0259075b12df1313388ade7c58628f28 (commit)
      from  7adcd01d96ac8f9077d32f214c85c0d8ef866308 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=e686195a0259075b12df1313388ade7c58628f28


commit e686195a0259075b12df1313388ade7c58628f28
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Dec 29 12:31:59 2015 +0100

    tests/ftp-localhost.sh: Incomplete error handling.
    
    Catch an unintended exception state.

diff --git a/ChangeLog b/ChangeLog
index 10a1d20..17cb1e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2015-12-29  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	tests/ftp-localhost.sh: Incomplete error handling.
+	The use of sysctl(8) with option `set -e` active during
+	script execution needs a robust exception handler.
+	Reported by Ingo Brückl in
+	http://lists.gnu.org/archive/html/bug-inetutils/2015-12/msg00000.html
+
+	* tests/ftp-localhost.sh: Locate sysctl(8) using `command`
+	with an augmented search path.  When computing VALUE_V6ONLY
+	in a subshell, add a short circuit with `true` to prevent
+	interruption of the test script.
+	(SYSCTL): New variable.
+
 2015-10-08  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	syslogd: Redefine faulty macro LOG_MAKEPRI whenever needed.
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index f589549..256b790 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -517,7 +517,7 @@ fi # TEST_IPV6
 # Availability of IPv4-mapped IPv6 addresses.
 #
 # These are impossible on OpenBSD, so a flexible test
-# is implemented using sysctl(1) as tool.
+# is implemented using sysctl(8) as tool.
 
 # Helpers tp catch relevant execution path.
 have_sysctl=false
@@ -531,8 +531,12 @@ test `uname -s` = 'SunOS' && have_address_mapping=true
 if $have_address_mapping; then
     :
 else
-    # Do we have sysctl(1) available?
-    if sysctl -a >/dev/null 2>&1; then
+    # Do we have sysctl(8) available?
+    # It need not be present with the default search path,
+    # so locally augment PATH!
+    SYSCTL=`PATH="$PATH":/usr/sbin:/sbin command -v sysctl`
+
+    if test -n "$SYSCTL"; then
 	have_sysctl=true
     else
 	echo "Warning: Not testing IPv4-mapped addresses." >&2
@@ -548,7 +552,7 @@ elif $have_sysctl; then
     # or
     #    net.inet6.ip6.v6only (BSD).
     #
-    value_v6only=`sysctl -a 2>/dev/null | $GREP v6only`
+    value_v6only=`$SYSCTL -a 2>/dev/null | $GREP v6only || true`
     if test -n "$value_v6only"; then
 	value_v6only=`echo $value_v6only | $SED 's/^.*[=:] *//'`
 	if test "$value_v6only" -eq 0; then

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   14 ++++++++++++++
 tests/ftp-localhost.sh |   12 ++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


