On Wed, Aug 22, 2012 at 11:55:02AM +0200, Thomas Bächler wrote:
Am 19.08.2012 21:15, schrieb Gerardo Exequiel Pozzi:
- DHCP is requested again on real-root. I guess, is most cases, there
is no issues since is re-assigned the same IP address. (this bug introduced recently since rc.conf enabled "network")
This is actually necessary. If you don't start a real DHCP daemon on boot, then you won't renew your lease and the DHCP server may give the IP to someone else.
Your lease should still be valid when you re-launch DHCP, so you can rely on getting the same IP. You could probably even configure dhcpcd to specifically request the correct IP.
Solutions: a) If this happens suggest the to the user use copytoram=y b) Use copytoram=y in NBD/NFS by default (this is always done for HTTP), user can change this behaviour. c) Disable DHCP service from relevant hooks.
None of these are good solutions.
- Stopping network on shutdown, if network is stopped before reach
shutdown-initramfs againt this does not look good. Solutions: a) See how to skip network on shutdown. b) Same point (1.b)
We must not stop network on shutdown. We can quit dhcpcd without releasing the lease or shutting down the network. If this is not possible with systemd, then something is very wrong.
Both are feasible. Adding the -p flag to dhcpcd to prevent it from ditching the address on exit is easily done. Alternatively, you can arbitrarily change argv by prefixing the binary path for ExecStart with a @, e.g.:
ExecStart=@/usr/bin/dhcpcd @dhcpcd -A eth0
The @ prefix on the argv0 then tells systemd to not kill this horribly on shutdown (or should, in theory).