From e8e5a6a2d1e30c18f77bbcc14dff21ea12f74ce3 Mon Sep 17 00:00:00 2001 From: Minfei Huang Date: Thu, 6 Aug 2015 21:19:26 +0800 Subject: [PATCH] module-setup: Add permanent option to detect static ip address or not Dracut will die in the situation that dracut detects to use dhcp to setup ip address, but kdump passes the ip address to it. In commit 7ea50dc7a38d14009b9be36f6d6ca59a89a430be, we start to use option permanent to get the ip address in kdump_static_ip. If the network is setuped by static, we will get the ip address, otherwise getting none. In commit c994a80698b6b12e50791b36fe40ae36485098d0 which it used to support ipv6 protocol, I miss the option permanent. This patch is not a fixing patch, just pulls back something to make kdump work as original. Signed-off-by: Minfei Huang Acked-by: Dave Young --- dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c37f7c0..dbe9b10 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -92,7 +92,7 @@ kdump_static_ip() { local _netdev="$1" _srcaddr="$2" _ipv6_flag local _netmask _gateway _ipaddr _target _nexthop - _ipaddr=$(ip addr show dev $_netdev | awk "/ $_srcaddr\/.* /{print \$2}") + _ipaddr=$(ip addr show dev $_netdev permanent | awk "/ $_srcaddr\/.* /{print \$2}") if is_ipv6_address $_srcaddr; then _ipv6_flag="-6"