From: "Ludovic Courtès" <ludo@gnu.org>
To: "Sören Tempel" <soeren@soeren-tempel.net>
Cc: 68675@debbugs.gnu.org
Subject: [bug#68675] [PATCH v2] services: dhcp: Support the dhcpcd implementation.
Date: Wed, 28 Feb 2024 21:46:16 +0100 [thread overview]
Message-ID: <87v868fhbb.fsf@gnu.org> (raw)
In-Reply-To: <2W69OW2TSRJI1.2UCT83W2YH8FC@8pit.net> ("Sören Tempel"'s message of "Tue, 13 Feb 2024 13:52:15 +0100")
Hi Sören,
Apologies for the late reply.
Sören Tempel <soeren@soeren-tempel.net> skribis:
> Ludovic Courtès <ludo@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 meant, within the ‘start’ method, something like:
(start #~(…
;; Check whether we’re dealing with ISC’s dhclient or dhcpcd.
(let ((type (if (file-exists?
(string-append #$package "/bin/dhclient"))
'isc-dhcp
'dhcpcd)))
(fork+exec-command …))))
Does that make sense?
>> 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.
What do others do? I guess it’s not possible to have a systemd .service
file given those PID file semantics, is it?
Thanks,
Ludo’.
next prev parent reply other threads:[~2024-02-28 20:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 16:12 [bug#68675] [PATCH] Support dhcpcd in dhcp-client-service-type soeren
2024-01-23 16:14 ` [bug#68675] [PATCH] gnu: Add dhcpcd soeren
2024-01-23 16:14 ` [bug#68675] [PATCH] services: dhcp: Support the dhcpcd implementation soeren
2024-01-23 19:52 ` [bug#68675] [PATCH] Support dhcpcd in dhcp-client-service-type Sergey Trofimov
2024-01-24 19:11 ` Sören Tempel
2024-01-24 19:05 ` [bug#68675] [PATCH v2] gnu: Add dhcpcd soeren
2024-01-24 19:05 ` [bug#68675] [PATCH v2] services: dhcp: Support the dhcpcd implementation soeren
2024-02-12 21:41 ` Ludovic Courtès
2024-02-13 12:52 ` Sören Tempel
2024-02-28 20:46 ` Ludovic Courtès [this message]
2024-02-12 21:32 ` [bug#68675] [PATCH v2] gnu: Add dhcpcd Ludovic Courtès
2024-02-13 12:50 ` [bug#68675] [PATCH v3 1/2] " soeren
2024-02-13 12:50 ` [bug#68675] [PATCH v3 2/2] services: dhcp: Support the dhcpcd implementation soeren
2024-02-28 20:53 ` Ludovic Courtès
2024-03-11 9:10 ` Sören Tempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v868fhbb.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=68675@debbugs.gnu.org \
--cc=soeren@soeren-tempel.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.