From 02be907a12dc291b02f6e895ca15f2fb20037185 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Fri, 10 Mar 2023 20:21:21 +0000 Subject: system: Simplify nsswitch binding. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/system.scm (operating-system-etc-service): Simplify nsswitch binding. Signed-off-by: Ludovic Courtès --- gnu/system.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnu/system.scm') 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 -- cgit v1.2.3