From 3095bd59001b14b87515c9cc87e0e87e0694f17e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 14 Jan 2012 20:55:27 +0000 Subject: Test for locally configured IP addresses by trying to bind nc to it. Thanks to Thomas Steen Rasmussen and #bsdports --- ezjail-admin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ezjail-admin') diff --git a/ezjail-admin b/ezjail-admin index 1748436..4b7bd35 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -708,7 +708,7 @@ EOF TIFS=${IFS}; IFS=, for ezjail_ip in ${ezjail_ips}; do # check, whether IP is configured on a local interface, warn if it isnt - ping -c 1 -m 1 -t 1 -q ${ezjail_ip} > /dev/null + nc -n -s ${ezjail_ip} -u -w 0 127.0.0.1 1 2> /dev/null [ $? -eq 0 ] || echo "Warning: IP ${ezjail_ip} not configured on a local interface." # check, whether some host system services do listen on the Jails IP -- cgit v1.2.3