gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: dns: bashism. Add check for


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: dns: bashism. Add check for iptables.
Date: Sat, 09 Mar 2019 11:34:29 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new a21da39e0 dns: bashism. Add check for iptables.
a21da39e0 is described below

commit a21da39e0c7bb11f330b20bddba3fb88259ca4ff
Author: ng0 <address@hidden>
AuthorDate: Sat Mar 9 10:34:22 2019 +0000

    dns: bashism. Add check for iptables.
---
 src/dns/test_gnunet_dns.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/dns/test_gnunet_dns.sh b/src/dns/test_gnunet_dns.sh
index 57b9716f5..0fa338c9b 100755
--- a/src/dns/test_gnunet_dns.sh
+++ b/src/dns/test_gnunet_dns.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 ME=`whoami`
 if [ "$ME" != "root" ]
@@ -26,12 +26,17 @@ then
   echo "This test requires nslookup.  Skipping."
   exit 77
 fi
-if ! iptables -t mangle --list &> /dev/null
+if [ ! -x `which iptables` ]
+then
+    echo "This test requires iptables.  Skipping."
+    exit 77
+fi
+if ! iptables -t mangle --list > /dev/null 2>&1
 then
   echo "This test requires iptables with 'mangle' support. Skipping."
   exit 77
 fi
-if grep % /etc/resolv.conf &> /dev/null
+if grep % /etc/resolv.conf > /dev/null 2>&1
 then
   echo "This system seems to use a DNS server on an IPv6 link-local address, 
which is not supported. Skipping."
   exit 77
@@ -52,5 +57,6 @@ else
  echo "Test run, with success."
  ret=0
 fi
+# TODO: jobs is a possible bashism. Fix.
 kill `jobs -p`
 exit $ret

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]