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

Dave Young dyoung at redhat.com
Thu Aug 6 06:07:31 UTC 2015


On 08/06/15 at 11:59am, Minfei Huang wrote:
> Dracut will die in the situation that dracut detects to use dhcp to get
> ip address, but kdump passes the ip address to it.
> 
> The command "ip addr show dev $dev permanent" will only show the static
> ip. Thues kdump cannot get the ip address in kdump_static_ip, if we use
> dhcp to setup the network.

The description is wrong, actualy we used 'permanent' option to check if
it is static ip since commit 7ea50dc7a38d14009b9be36f6d6ca59a89a430be.

It was a mistake in previous ipv6 patchset you dropped 'permanent' so that
dracut detects the wrong setup during qiao's testing.

Please mention above so that we are clear it is not fixing a bug instead
pull back something that originally works.


> 
> 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
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.fedoraproject.org
> https://lists.fedoraproject.org/mailman/listinfo/kexec


More information about the kexec mailing list