get ip addr with getent
Build kdump image will fail when kdump.conf has net option with a host name instead of ip address. Handle this just as what we do in rhel6: use getent to get the ip addr. Signed-off-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
726d9319cb
commit
985fcae6ec
@ -57,6 +57,9 @@ install() {
|
|||||||
_server=$(echo $config_val | sed -e 's#\(.*\):.*#\1#')
|
_server=$(echo $config_val | sed -e 's#\(.*\):.*#\1#')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_need_dns=`echo $_server|grep "[a-zA-Z]"`
|
||||||
|
[ -n $need_dns ] && _server=`getent hosts $_server|cut -d' ' -f1`
|
||||||
|
|
||||||
_netdev=`/sbin/ip route get to $_server 2>&1`
|
_netdev=`/sbin/ip route get to $_server 2>&1`
|
||||||
[ $? != 0 ] && echo "Bad kdump location: $config_val" && exit 1
|
[ $? != 0 ] && echo "Bad kdump location: $config_val" && exit 1
|
||||||
#the field in the ip output changes if we go to another subnet
|
#the field in the ip output changes if we go to another subnet
|
||||||
|
Loading…
Reference in New Issue
Block a user