From patchwork Tue Jul 25 10:59:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 52183 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6FBFE27BBE9; Tue, 25 Jul 2023 12:01:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6F36F27BBE2 for ; Tue, 25 Jul 2023 12:01:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOFmt-0006G0-6R; Tue, 25 Jul 2023 07:01:07 -0400 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 1qOFmo-00069B-FB for guix-patches@gnu.org; Tue, 25 Jul 2023 07:01:02 -0400 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 1qOFmo-0007KL-6r for guix-patches@gnu.org; Tue, 25 Jul 2023 07:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOFmo-00070Y-2B for guix-patches@gnu.org; Tue, 25 Jul 2023 07:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64850] [PATCH 1/1] services: dhcp-client-configuration: Allow provision override References: <20230725105739.17244-1-levenson@mmer.org> In-Reply-To: <20230725105739.17244-1-levenson@mmer.org> Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Jul 2023 11:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64850@debbugs.gnu.org Received: via spool by 64850-submit@debbugs.gnu.org id=B64850.169028281426874 (code B ref 64850); Tue, 25 Jul 2023 11:01:02 +0000 Received: (at 64850) by debbugs.gnu.org; 25 Jul 2023 11:00:14 +0000 Received: from localhost ([127.0.0.1]:44725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOFm1-0006zO-W3 for submit@debbugs.gnu.org; Tue, 25 Jul 2023 07:00:14 -0400 Received: from mail.mmer.org ([178.22.65.174]:55718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOFm0-0006y6-8O for 64850@debbugs.gnu.org; Tue, 25 Jul 2023 07:00:12 -0400 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id 075e9703 for <64850@debbugs.gnu.org>; Tue, 25 Jul 2023 11:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=dkim; bh=UmajVtjdglM+zqo8HIBVXe+Bb/QCV2IXnBgJaPpD0gY=; b=YSld BcblLaOYPTBQ055qCqFS2qfR44SqhQdSd0NmKFPuU4+AYu44gNsfyFK5qA+hxTuM v9gKVy30s1+fFpOr3SwkLuWX7CGw8nRb61K8dp/86ijGwba++8itLh5g7mrItBZh YJhBJrly+BS7BUPwsrsyPbIdtWAu/aYI0pMQWtQ= Received: from delta (j74210.upc-j.chello.nl [24.132.74.210]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id 2102d153 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <64850@debbugs.gnu.org>; Tue, 25 Jul 2023 11:00:04 +0000 (UTC) Date: Tue, 25 Jul 2023 12:59:56 +0200 Message-Id: <20230725105956.17963-1-levenson@mmer.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 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: , Reply-to: Alexey Abramov X-ACL-Warn: , Alexey Abramov via Guix-patches X-Patchwork-Original-From: Alexey Abramov via Guix-patches via From: Alexey Abramov Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/networking.scm: Allow setting up provision to allow running DHCP client and static network configuration simultaneously. --- gnu/services/networking.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 5657b141d9..dc75c2f59d 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -88,6 +88,7 @@ (define-module (gnu services networking) dhcp-client-configuration dhcp-client-configuration? dhcp-client-configuration-package + dhcp-client-configuration-provision dhcp-client-configuration-interfaces dhcp-client-configuration-shepherd-requirement @@ -303,6 +304,8 @@ (define-record-type* (default isc-dhcp)) (shepherd-requirement dhcp-client-configuration-shepherd-requirement (default '())) + (provision dhcp-client-configuration-provision + (default '(networking))) (interfaces dhcp-client-configuration-interfaces (default 'all))) ;'all | list of strings @@ -312,6 +315,7 @@ (define dhcp-client-shepherd-service (let ((package (dhcp-client-configuration-package config)) (shepherd-requirement (dhcp-client-configuration-shepherd-requirement config)) (interfaces (dhcp-client-configuration-interfaces config)) + (provision (dhcp-client-configuration-provision config)) (pid-file "/var/run/dhclient.pid")) (list (shepherd-service (documentation "Set up networking via DHCP.") @@ -321,7 +325,7 @@ (define dhcp-client-shepherd-service ;; networking is unavailable, but also means that the interface is not up ;; yet when 'start' completes. To wait for the interface to be ready, one ;; should instead monitor udev events. - (provision '(networking)) + (provision provision) (start #~(lambda _ (define dhclient