From: cajus Date: Thu, 21 Jun 2007 07:56:26 +0000 (+0000) Subject: Fixed possible deadlock X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b488d6631bd810c3d28b2927c0c07d714461cde3;p=gosa.git Fixed possible deadlock git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6640 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/contrib/scripts/net-resolver.sh b/contrib/scripts/net-resolver.sh index 98364c271..bd120264a 100755 --- a/contrib/scripts/net-resolver.sh +++ b/contrib/scripts/net-resolver.sh @@ -17,6 +17,10 @@ done mac="" ip=$(LANG=C $host $1 | grep address | head -n1 | sed 's/^.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/g') +if [ -z "$ip" ]; then + echo ";" + exit 0 +fi if $fping -c1 -r3 -t500 $ip &> /dev/null; then mac=$($arp -n | awk "/^$ip/ {print \$3}") fi