Comment # 15 on bug 1173402 from
(In reply to Thomas Blume from comment #14)
> (In reply to Fabian Vogt from comment #12)
> > - Touch did-setup in the "# no ip option directed at our interface?" case
> > after successful do_dhcp
> > 
> > 0b998beebc008f2dda2eed8a36d59f4a258cb27a introduced the code to handle the
> > latter, but:
> > - It also runs in cases where the do_dhcp in this block wasn't actually run
> > (like in this bug report)
> > - The $? it checks is meaningless at this point due to the ifs
> 
> Hm, did you check the latest code?
> There is:
> 
> if [ $? -eq 0 ] && [ -n "$(ls /tmp/leaseinfo.${netif}*)" ]; then
> 
> the leasinfo file won't be there if there was no dhcp setup.

Yes, but the use of $? there is still wrong AFAICT.

> > In the "rd.neednet=1 bootdev=eth0" case it actually runs do_dhcp twice for
> > the interface, as both
> > "# No ip ..." blocks apply. Maybe those blocks should be merged?
> 
> Those parameters are a bit different, bootdev is documented as:
> -->
> bootdev=<interface>
>            specify network interface to use routing and netroot information
> from. Required if multiple ip= lines are used.
> --<
> 
> So it is bound to the netroot case and a specific interface, whereas
> rd.neednet does the network setup unconditionally.

That seems to be working with netroot, but not depend on netroot.
It doesn't say that bootdev can only be specified if multiple ip= options
are set, but only that it is mandatory in that case.

> Also, the code for evaluating rd.neednet isn't in ifup.sh but in
> net-genrules.sh.
> 
> Considering the duplicate run of do_dhcp, I'd blame this at the missing
> check for netroot as outlined above.

Not tested, but would that just move the "dhcp twice" case to netroot only?
There's nothing which prevents the "# no ip option directed at our interface?"
block from running after "# No ip lines default to dhcp" as the former doesn't
touch /tmp/net.${netif}.up, does it?


You are receiving this mail because: