https://bugzilla.suse.com/show_bug.cgi?id=1173402
https://bugzilla.suse.com/show_bug.cgi?id=1173402#c23
Fabian Vogt
(In reply to Fabian Vogt from comment #21)
(In reply to Thomas Blume from comment #20)
I've created testpackages with a proposed patch at:
https://build.opensuse.org/package/show/home:tsaupe:branches:openSUSE: Factory:dracut-bsc1173402/dracut
It worked well in my test setup, but it would be good if you could confirm.
Confirmed to work with: rd.neednet -> DHCPv4 rd.neednet ip=dhcp6 -> DHCPv6 rd.neednet bootdev=eth0 -> DHCPv4 (once)
Here is the commit for reference:
https://github.com/tblume/dracut/commit/ 2127271afdbf8ab669a86b382e75eb51a9965396
I'd actually go a step further: https://github.com/Vogtinator/dracut-1/commit/ b39e4fe4d53a0806f82aa303690a7a7da9d09711
That also makes other differences (bugs?) more obvious: - in the bootdev case, it calls load_ipv6, then do_dhcp. AFAICT do_dhcp is equivalent to do_dhcp -4 for wicked, but probably not dhclient? - for s in $(getargs nameserver); do ... done is only done if ip is not set, but not in the ip=dhcp/dhcp6 case or the bootdev case - load_ipv6 is missing before do_dhcp -6
Thanks a lot Fabian, I took the freedom to merge your commit and addressed the above issues. Looking into the dhclient manpage I've found that it defaults to dhcp4, so it should behave just like wicked.
Ok, then I don't understand why it calls load_ipv6...
There was one little quirks in your patch, it didn't address the case when net.bootdev exists. In that case do_dhcp (-4) would have been already called in the BOOTDEV branch. So, I've added a check.
It's actually in the else branch of "if [ -e /tmp/net.bootdev ];", so that check is AFAICT redundant and can never trigger.
My updated patch is at:
https://github.com/tblume/dracut/commit/ 824f0308428d3e270a346ad69f38f70387304111
Would be nice if you could take another look and double check.
LGTM, except for the redundant check, but I didn't actually test it (yet). -- You are receiving this mail because: You are the assignee for the bug.