diff options
author | erdgeist <erdgeist@erdgeist.org> | 2012-01-15 18:49:57 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2012-01-15 18:49:57 +0000 |
commit | 9a22c2885615333241230a7f2f49e7b9c200f957 (patch) | |
tree | 8d350d73619d88639c62d8ed39d5bfb597d7ca3f /ezjail-admin | |
parent | 3095bd59001b14b87515c9cc87e0e87e0694f17e (diff) |
Have the test for local addresses be done by ping while trying to send from the IP to the IP. The intermediate approach using nc did not work in 9.0
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-x | ezjail-admin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin index 4b7bd35..5b8610f 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -707,8 +707,9 @@ EOF | |||
707 | 707 | ||
708 | TIFS=${IFS}; IFS=, | 708 | TIFS=${IFS}; IFS=, |
709 | for ezjail_ip in ${ezjail_ips}; do | 709 | for ezjail_ip in ${ezjail_ips}; do |
710 | case ${ezjail_ip} in *.*.*.*) _ping=ping;; *) _ping=ping6;; esac | ||
710 | # check, whether IP is configured on a local interface, warn if it isnt | 711 | # check, whether IP is configured on a local interface, warn if it isnt |
711 | nc -n -s ${ezjail_ip} -u -w 0 127.0.0.1 1 2> /dev/null | 712 | ${_ping} -S ${ezjail_ip} -q -c 1 localhost >/dev/null 2>/dev/null |
712 | [ $? -eq 0 ] || echo "Warning: IP ${ezjail_ip} not configured on a local interface." | 713 | [ $? -eq 0 ] || echo "Warning: IP ${ezjail_ip} not configured on a local interface." |
713 | 714 | ||
714 | # check, whether some host system services do listen on the Jails IP | 715 | # check, whether some host system services do listen on the Jails IP |