On Thu, 24 Oct 2024 14:07:58 +0100 Athanasius <deb...@miggy.org> wrote:
> Package: dhcpcd
> Version: 1:10.1.0-1
> Severity: important
>
> Dear Maintainer,
>
> Given the pending removal of the isc `dhclient` I decided to move over
> to another method for obtaining DHCP leases.  `dhcpcd`, in the form of
> `dhcpcd-base` appears to be the leading contender, so I settled on that.
>
> It works fine, but as it forks and runs in the background (if run either
> as the `dhcpcd` daemon as I am doing, or the `dhcpcd-base` non-daemon)
> it provides no feedback as to when addresses are obtained and thus
> systemd, or anything else, can't easily know when networking is up for
> the purposes of NFS mounts.
>
> I *had* been using a static IPv4 setup, utilising a
> `/etc/network/interfaces.d/<interface>` file, but had good reason to
> change this over to DHCP.  With the static setup systemd's
> remote-fs.target took care of the mount without issues.
>
> As supplied use of `dhcpcd` (or -base) makes **no** attempt to ensure
> that NFS mounts happen.  There's no feedback into systemd, nor is there
> any implementation of a dhcpcd hook file for this purpose.  At least
> with dhclient it integrated with ifup and there's
> `/etc/network/if-up.d/mountnfs`.  But this is not triggered by `dhcpcd`.
>
> I do note that I *first* tried using `dhcpcd-base`, along with `iface
> lan0 inet dhcp`, but this also did not trigger the mountnfs script.

dhcpcd-base is executed via /etc/network/interfaces as dhclient was.
Whatever exit hooks exist within `/etc/network/if-*.d/ will be
executed as before.

Important caveat: never install bin:dhcpcd on a host running ifupdown
since the init scripts and systemd units conflict with what ifupdown
and sytemd do.

It's also worth noting that dhcpcd expects non-generic interface names
that follow
Predictable Network Interface Names.

Martin-Éric

Reply via email to