summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2c99eb)
raw | patch | inline | side by side (parent: e2c99eb)
author | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Oct 2009 19:51:30 +0000 (19:51 +0000) | ||
committer | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Oct 2009 19:51:30 +0000 (19:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@14620 594d385d-05f5-0310-b6e9-bd551577e9d8
contrib/scripts/net-resolver.sh | patch | blob | history |
index 98364c271f6a8ba6042670054c083a51748e508f..52fa1a7ac3ed97cd6ddc4c7c04cfef67a21a6a64 100755 (executable)
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 $fping -c1 -r3 -t500 $ip &> /dev/null; then
+if $fping -c1 -r3 -t500 $ip >/dev/null 2>&1; then
mac=$($arp -n | awk "/^$ip/ {print \$3}")
fi
echo "$ip;$mac"