oe-git-proxy: don't depend on syslinux
gethostip comes from syslinux. It seems odd to depend on a bootloader to clone a git repository. Switch to using getent from the c-library, which should be available on every system. We now also support the case where a hostname resolves to more than one IP address. (From OE-Core rev: c91dbf3ca2faec95195c85b65aa6cab7de9bca2c) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
dd0474c7e8
commit
bffb0fbfcc
|
@ -86,13 +86,14 @@ match_host() {
|
||||||
|
|
||||||
# Match by netmask
|
# Match by netmask
|
||||||
if valid_ipv4 $GLOB; then
|
if valid_ipv4 $GLOB; then
|
||||||
HOST_IP=$(gethostip -d $HOST)
|
for HOST_IP in $(getent ahostsv4 $HOST | grep ' STREAM ' | cut -d ' ' -f 1) ; do
|
||||||
if valid_ipv4 $HOST_IP; then
|
if valid_ipv4 $HOST_IP; then
|
||||||
match_ipv4 $GLOB $HOST_IP
|
match_ipv4 $GLOB $HOST_IP
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in New Issue