For ethX, it fails to specify the static route in 2nd kernel, because of the
wrong ethernet device name.
To make kdump work, we add a prefix "kdump-" before the ethernet device
name (commit ba7660f37e792be082b7e0c9e73b76647db5e902).
Signed-off-by: Minfei Huang <mhuang(a)redhat.com>
---
dracut-module-setup.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 9299b5d..649e435 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -215,11 +215,13 @@ get_routes() {
if /sbin/ip route get to $_target | grep -q "via";
then
# route going to a different subnet via a router
- echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3,
$5)}' \
+ _netdev=$(kdump_setup_ifname $(echo $_route | awk '{print $5}'))
+ echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3,
_netdev)}' _netdev=$_netdev \
> ${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)}' \
+ _netdev=$(kdump_setup_ifname $(echo $_route | awk '{print $3}'))
+ echo $_route | awk '{printf("rd.route=%s::%s\n", $1, _netdev)}'
_netdev=$_netdev \
> ${initdir}/etc/cmdline.d/45route-static.conf
fi
--
1.8.3.1