[PATCH] module-setup: Add permanent option to detect static ip address or not

Minfei Huang mhuang at redhat.com
Thu Aug 6 13:19:26 UTC 2015


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 <mhuang at redhat.com>
---
 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"
-- 
2.1.0



More information about the kexec mailing list