Revert "rd.route should use the name from kdump_setup_ifname"
This reverts commit 18ffd3cb17
.
This commit is contained in:
parent
18ffd3cb17
commit
4753ab2c70
@ -235,7 +235,7 @@ cal_netmask_by_prefix() {
|
||||
#$2: srcaddr
|
||||
#if it use static ip echo it, or echo null
|
||||
kdump_static_ip() {
|
||||
local _netdev="$1" _srcaddr="$2" kdumpnic="$3" _ipv6_flag
|
||||
local _netdev="$1" _srcaddr="$2" _ipv6_flag
|
||||
local _netmask _gateway _ipaddr _target _nexthop _prefix
|
||||
|
||||
_ipaddr=$(ip addr show dev $_netdev permanent | awk "/ $_srcaddr\/.* /{print \$2}")
|
||||
@ -273,14 +273,14 @@ kdump_static_ip() {
|
||||
_target="[$_target]"
|
||||
_nexthop="[$_nexthop]"
|
||||
fi
|
||||
echo "rd.route=$_target:$_nexthop:$kdumpnic"
|
||||
echo "rd.route=$_target:$_nexthop:$_netdev"
|
||||
done >> ${initdir}/etc/cmdline.d/45route-static.conf
|
||||
|
||||
kdump_handle_mulitpath_route $_netdev $_srcaddr $kdumpnic
|
||||
kdump_handle_mulitpath_route $_netdev $_srcaddr
|
||||
}
|
||||
|
||||
kdump_handle_mulitpath_route() {
|
||||
local _netdev="$1" _srcaddr="$2" kdumpnic="$3" _ipv6_flag
|
||||
local _netdev="$1" _srcaddr="$2" _ipv6_flag
|
||||
local _target _nexthop _route _weight _max_weight _rule
|
||||
|
||||
if is_ipv6_address $_srcaddr; then
|
||||
@ -299,9 +299,9 @@ kdump_handle_mulitpath_route() {
|
||||
_nexthop=`echo "$_route" | cut -d ' ' -f3`
|
||||
_max_weight=$_weight
|
||||
if [ "x" != "x"$_ipv6_flag ]; then
|
||||
_rule="rd.route=[$_target]:[$_nexthop]:$kdumpnic"
|
||||
_rule="rd.route=[$_target]:[$_nexthop]:$_netdev"
|
||||
else
|
||||
_rule="rd.route=$_target:$_nexthop:$kdumpnic"
|
||||
_rule="rd.route=$_target:$_nexthop:$_netdev"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
@ -491,7 +491,7 @@ kdump_install_net() {
|
||||
kdump_setup_znet $_netdev
|
||||
fi
|
||||
|
||||
_static=$(kdump_static_ip $_netdev $_srcaddr $kdumpnic)
|
||||
_static=$(kdump_static_ip $_netdev $_srcaddr)
|
||||
if [ -n "$_static" ]; then
|
||||
_proto=none
|
||||
elif is_ipv6_address $_srcaddr; then
|
||||
|
Loading…
Reference in New Issue
Block a user