Better code to scan the ethertable.

This commit is contained in:
luigi 2001-10-25 17:40:03 +00:00
parent 750eb154f1
commit af343dd439

View File

@ -59,10 +59,10 @@ get_ether() {
# set "hostname" using $1 (ethernet address) as search key in /etc/hosts
fetch_hostname() {
local a b c key
local a b c key junk
key=$1 # search key
hostname=""
while read a b c ; do
while read a b c junk ; do
if [ "$a" = "#ethertable" ] ; then
hostname="."
elif [ "X$hostname" = "X." -a "X$a" = "X#" ] ; then