Revert "module-setup: Use proper ethernet device name in 2nd kernel"
This reverts commit 08809fb0c7
.
This commit is contained in:
parent
5380af665d
commit
6b7df5b0b3
@ -213,25 +213,20 @@ kdump_setup_znet() {
|
|||||||
|
|
||||||
get_routes() {
|
get_routes() {
|
||||||
local _netdev="$1" _target="$2"
|
local _netdev="$1" _target="$2"
|
||||||
local _route _nexthop
|
local _route
|
||||||
|
|
||||||
_route=`/sbin/ip route get to $_target 2>&1`
|
_route=`/sbin/ip route get to $_target 2>&1`
|
||||||
#
|
if /sbin/ip route get to $_target | grep -q "via";
|
||||||
# in the same subnet region, following is the route format
|
then
|
||||||
# _route='192.168.200.137 dev eth1 src 192.168.200.129
|
|
||||||
# cache '
|
|
||||||
#
|
|
||||||
# in the different subnet region, following is the route format
|
|
||||||
# _route='192.168.201.215 via 192.168.200.137 dev eth1 src 192.168.200.129
|
|
||||||
# cache '
|
|
||||||
#
|
|
||||||
if `echo $_route | grep -q "via"`; then
|
|
||||||
# route going to a different subnet via a router
|
# route going to a different subnet via a router
|
||||||
_nexthop=`echo $_route | awk '{print $3}'`
|
echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \
|
||||||
|
>> ${initdir}/etc/cmdline.d/45route-static.conf
|
||||||
|
else
|
||||||
|
# route going to a different subnet though directly connected
|
||||||
|
echo $_route | awk '{printf("rd.route=%s::%s\n", $1, $3)}' \
|
||||||
|
>> ${initdir}/etc/cmdline.d/45route-static.conf
|
||||||
fi
|
fi
|
||||||
_netdev=$(kdump_setup_ifname $_netdev)
|
|
||||||
|
|
||||||
echo "rd.route=$_target:$_nexthop:$_netdev" >> ${initdir}/etc/cmdline.d/45route-static.conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup dracut to bringup a given network interface
|
# Setup dracut to bringup a given network interface
|
||||||
|
Loading…
Reference in New Issue
Block a user