diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 0779224..a49107d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -520,9 +520,7 @@ kdump_get_ip_route() kdump_get_ip_route_field() { - if `echo $1 | grep -q $2`; then - echo ${1##*$2} | cut -d ' ' -f1 - fi + echo "$1" | sed -n -e "s/^.*\<$2\>\s\+\(\S\+\).*$/\1/p" } kdump_get_remote_ip()