From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mGotDPub32WkOAAAqHPOHw:P1 (envelope-from ) for ; Wed, 28 Feb 2024 21:47:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mGotDPub32WkOAAAqHPOHw (envelope-from ) for ; Wed, 28 Feb 2024 21:47:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mWz3AzsR; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709153275; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hg/TL1miv9ts9bfbea+PRML7fugmX/sEpJjfZXbEQuU=; b=XpifgixOPOhX2HPAfe19XE+lstQczh3zrT/leOJC269XvkNrekKE+hB41MwvQc8xRQpd9h OUKKBfr1fK6XLmG++A1xpB9LGuutehM5kO83R9xoD5eUoVm5caAdic4WVOJbdQCpJo3Z2f bLi9cb2Ex/9ZQMdJBSxvHoAupwlc1zBPqrRpIhOuApw4Ks/baKvFUxRzoEcJ6teZOhjZcz tWvGw9Wu6+CDwpiHyoKrXYq6SYdn9QTvePMn8ZASsLfDG//uLlfpXjs2fW2bH33xWnP8wC fSMW/sMEJyPayuDFETTkPpgenLTIuUQEEt4dH9ISOMYF78nANcDRZ/PCzh1vow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mWz3AzsR; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709153275; a=rsa-sha256; cv=none; b=bwEz/A92mvkZDrXAIkq2WLuAGX2e5VHdSmR/qQXBltjlJMhIESOGjbRdmEaTnpsgTgb5qk sCWKd7mvHUn4mB2eguRihiKcTImlgPmAJ+/tMw2NyeTEaiJWAsOJwZTNJd+CYbkouTTt79 yh342TKwMOx/eziterU/d+HegY7SKHmYswsaQj1lBz4WB9k1DyT791JInUjyItb1+MK6OY 0oxoki9Et6/rFYCLxP1citrYECd3ZwMjRUIXETIystlIHZpU/zEChG8OWNmz44/njuA5Io HnJJButkPEvjdblzx3piy4Oczz4jWsrs7YK+7TDmoU6dUAesAT0NFd4JE8J4Pw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 953383AFD2 for ; Wed, 28 Feb 2024 21:47:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfQqD-0002G7-49; Wed, 28 Feb 2024 15:47:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQq0-0002AG-BL for guix-patches@gnu.org; Wed, 28 Feb 2024 15:47:36 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfQq0-0006V5-2M for guix-patches@gnu.org; Wed, 28 Feb 2024 15:47:36 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rfQqQ-0002WB-CR for guix-patches@gnu.org; Wed, 28 Feb 2024 15:48:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68675] [PATCH v2] services: dhcp: Support the dhcpcd implementation. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Feb 2024 20:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?S=C3=B6ren?= Tempel Cc: 68675@debbugs.gnu.org Received: via spool by 68675-submit@debbugs.gnu.org id=B68675.17091532249518 (code B ref 68675); Wed, 28 Feb 2024 20:48:02 +0000 Received: (at 68675) by debbugs.gnu.org; 28 Feb 2024 20:47:04 +0000 Received: from localhost ([127.0.0.1]:42085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfQpT-0002TP-Gx for submit@debbugs.gnu.org; Wed, 28 Feb 2024 15:47:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfQpO-0002Sb-C5 for 68675@debbugs.gnu.org; Wed, 28 Feb 2024 15:47:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQor-0006Dg-3j; Wed, 28 Feb 2024 15:46:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=hg/TL1miv9ts9bfbea+PRML7fugmX/sEpJjfZXbEQuU=; b=mWz3AzsRfFHKyA8pAfab hmvt/icYJz3TaRkz8v57lObMgmTCx6hYgx21HkNobUJiuBske0PoVVLfpGDacCqS+4S/OyE3G8oJL F/4oS1uihOBG/2yeQASj10HGN1DFKm9qu0sBOoCSXRqHi+BBI/77NJ7cuiHbJyoKAh94d/j7u0iQM UYY4/psucbLEq08W156KwWhemq24dfDwAJFq0JxP0jv6bjdZehrZC0lCgWHYwdtZjYCwueohVWmEn NUdfQlYGxiha+HyaOQaQnb2Tbl4TfdF7HVJbg8OPtZIdVQwH5rcTFhOfPJ0xJ7FOwXnADIiFVAT1I SSx6R0BVFXFEWw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <2W69OW2TSRJI1.2UCT83W2YH8FC@8pit.net> ("=?UTF-8?Q?S=C3=B6ren?= Tempel"'s message of "Tue, 13 Feb 2024 13:52:15 +0100") References: <2156325d2caa8d4298c9828d84fa5fff40592da4.1706123111.git.soeren@soeren-tempel.net> <5aff02159575834de675684dfde71d2ec66f4b10.1706123111.git.soeren@soeren-tempel.net> <87ttmdbbs9.fsf@gnu.org> <2W69OW2TSRJI1.2UCT83W2YH8FC@8pit.net> Date: Wed, 28 Feb 2024 21:46:16 +0100 Message-ID: <87v868fhbb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.17 X-Spam-Score: -7.17 X-Migadu-Queue-Id: 953383AFD2 X-Migadu-Scanner: mx11.migadu.com X-TUID: KahAcK2ak6xf Hi S=C3=B6ren, Apologies for the late reply. S=C3=B6ren Tempel skribis: > Ludovic Court=C3=A8s wrote: >> Instead of calling =E2=80=98package-name=E2=80=99, which would prevent t= he use of >> something other than a record (such as an ) >> or a package with a different name (like =E2=80=9Cdhcpcd-next=E2=80=9D),= 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 =E2=80=98start=E2=80=99 method, something like: (start #~(=E2=80=A6 ;; Check whether we=E2=80=99re dealing with ISC=E2=80=99s dhcl= ient or dhcpcd. (let ((type (if (file-exists? (string-append #$package "/bin/dhclient")) 'isc-dhcp 'dhcpcd))) (fork+exec-command =E2=80=A6)))) 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=E2=80=99s not possible to have a systemd .se= rvice file given those PID file semantics, is it? Thanks, Ludo=E2=80=99.