GNU bug report logs -
#68675
[PATCH] Support dhcpcd in dhcp-client-service-type
Previous Next
Reported by: soeren <at> soeren-tempel.net
Date: Tue, 23 Jan 2024 16:14:01 UTC
Severity: normal
Tags: patch
Done: Sören Tempel <soeren <at> soeren-tempel.net>
Bug is archived. No further changes may be made.
Full log
Message #38 received at 68675 <at> debbugs.gnu.org (full text, mbox):
Hi Ludovic,
Thanks a lot for the feedback, really truly helpful! More comments below.
Ludovic Courtès <ludo <at> gnu.org> wrote:
> Instead of calling ‘package-name’, which would prevent the use of
> something other than a <package> record (such as an <inferior-package>)
> or a package with a different name (like “dhcpcd-next”), what about
> checking in the gexp which of /bin/dhclient and /bin/dhcpcd exists?
I think I haven't fully grasped G-Expressions yet. I do understand how
this would work inside the shepherd start gexp. However, I am not sure
how I would check if /bin/dhclient or /bin/dhcpcd exist in the package
within the dhcp-client-account-service since, at least as far as
I understand, the dhcp-client-account-service is itself not a gexp.
I think one could also argue that it might be preferable to check for
the package name as, just because a package provides /bin/dhclient,
doesn't necessarily mean that it is command-line compatible with the ISC
implementation. However, if you have any hints on updating the
account-service I would be willing to look into it.
> That sounds quite complex. Surely there must be a way to force the name
> of the PID file or to determine its name without running dhcpcd in a
> pipe?
Unfortunately, I don't think there is any way to force the PID file
name. Furthermore, the pidfile path depends on the amount interfaces
specified. If there is only one interface, a single dhcpcd instance is
spawned and the pidfile refers to that. Otherwise, a management process
is started and the pidfile refers to the management process [1].
I think the best solution here would be to spawn dhcpcd as child process
of GNU shepherd and have shepherd supervise it that way. I have a service
doing that too, but its annoying to integrate with the existing dhclient
service [2]. Maybe that's something we can migrate to in the long run.
> Or leave it out entirely: I find it useful to have a DHCP client at hand
> just in case. Thoughts?
I removed it, I agree that this change is best discussed separately.
> Could you send updated patches?
Apart from the two comments I discussed in greater detail above, I hope
I implemented all of your feedback as requested in the v3 revision of
this patchset. Please let me know if I missed anything.
Greetings
Sören
[1]: https://github.com/NetworkConfiguration/dhcpcd/blob/v10.0.6/src/dhcpcd.c#L2144
[2]: https://github.com/nmeum/guix-channel/blob/b1b80697a9d35ca015ce56ccf3031f91f2bf554f/src/nmeum/services/networking.scm#L130-L132
This bug report was last modified 76 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.