From patchwork Fri Mar 10 20:21:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47856 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 EEF7E16E86; Fri, 10 Mar 2023 20:22:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham 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 F27F716E82 for ; Fri, 10 Mar 2023 20:22:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pajFc-0008SY-JW; Fri, 10 Mar 2023 15:22:04 -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 1pajFa-0008RT-Dc for guix-patches@gnu.org; Fri, 10 Mar 2023 15:22:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pajFa-0002Y5-5N for guix-patches@gnu.org; Fri, 10 Mar 2023 15:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pajFZ-0000LC-Qr for guix-patches@gnu.org; Fri, 10 Mar 2023 15:22:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#62103] [PATCH 1/2] system: Simplify nsswitch binding. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Mar 2023 20:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62103 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62103@debbugs.gnu.org Cc: ludo@gnu.org, Bruno Victal Received: via spool by 62103-submit@debbugs.gnu.org id=B62103.16784797071284 (code B ref 62103); Fri, 10 Mar 2023 20:22:01 +0000 Received: (at 62103) by debbugs.gnu.org; 10 Mar 2023 20:21:47 +0000 Received: from localhost ([127.0.0.1]:55938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pajFL-0000Kd-AW for submit@debbugs.gnu.org; Fri, 10 Mar 2023 15:21:47 -0500 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:51158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pajFJ-0000KP-Fo for 62103@debbugs.gnu.org; Fri, 10 Mar 2023 15:21:45 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id 9D741203BF; Fri, 10 Mar 2023 21:21:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 544FC80098; Fri, 10 Mar 2023 21:21:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kXXoQgQs5RRf; Fri, 10 Mar 2023 21:21:44 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id DEF7480079; Fri, 10 Mar 2023 21:21:43 +0100 (CET) From: Bruno Victal Date: Fri, 10 Mar 2023 20:21:21 +0000 Message-Id: <83d8b5570f63ac80db92c54a82fddf4d81a1b5a4.1678479682.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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: , 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/system.scm (operating-system-etc-service): Simplify nsswitch binding. --- gnu/system.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) base-commit: f7682c247504d252cf86b274ffe7b8f62670b497 diff --git a/gnu/system.scm b/gnu/system.scm index bb26d7c9a5..2947d1321f 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1001,10 +1001,9 @@ (define* (operating-system-etc-service os) (hurd (operating-system-hurd os)) (issue (plain-file "issue" (operating-system-issue os))) - (nsswitch (operating-system-name-service-switch os)) - (nsswitch (and nsswitch - (plain-file "nsswitch.conf" - (name-service-switch->string nsswitch)))) + (nsswitch (and=> (operating-system-name-service-switch os) + (compose (cut plain-file "nsswitch.conf" <>) + name-service-switch->string))) (sudoers (operating-system-sudoers-file os)) ;; Startup file for POSIX-compliant login shells, which set system-wide