-#!/bin/bash
+#!/bin/sh
ME=`whoami`
if [ "$ME" != "root" ]
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
echo "Test run, with success."
ret=0
fi
+# TODO: jobs is a possible bashism. Fix.
kill `jobs -p`
exit $ret