[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#71064] [PATCH 7/7] gnu: services: nscd: add Nsncd optional support.
From: |
picnoir |
Subject: |
[bug#71064] [PATCH 7/7] gnu: services: nscd: add Nsncd optional support. |
Date: |
Sun, 19 May 2024 14:46:27 +0200 |
From: Picnoir <picnoir@alternativebit.fr>
* gnu/services/base.scm (services: nscd: add Nsncd optional support): Add a
new nscd-use-nscd? field in the Nscd configuration record. When set to #t, the
nscd service will use Nsncd in place of the Glibc's Nscd. I'm not 100% sure
adding this to the existing Nscd service is a good idea, it's however the most
convenient option for now. Or is it? :)
Change-Id: I73d03bd149ff005130e1ed2532e1b4b0e3d572f5
---
gnu/services/base.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 85160bd3ab..66306384c0 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -79,6 +79,7 @@ (define-module (gnu services base)
#:select (bcachefs-tools exfat-utils jfsutils zfs))
#:use-module (gnu packages fonts)
#:use-module (gnu packages terminals)
+ #:use-module (gnu packages nss)
#:use-module ((gnu packages wm) #:select (sway))
#:use-module ((gnu build file-systems)
#:select (mount-flags->bit-mask
@@ -1284,6 +1285,8 @@ (define-deprecated (mingetty-service config)
(define-record-type* <nscd-configuration> nscd-configuration
make-nscd-configuration
nscd-configuration?
+ (use-nsncd? nscd-use-nsncd? ;boolean
+ (default #t))
(log-file nscd-configuration-log-file ;string
(default "/var/log/nscd.log"))
(debug-level nscd-debug-level ;integer
@@ -1447,12 +1450,14 @@ (define (nscd-shepherd-service config)
(requirement '(user-processes syslogd))
(start #~(make-forkexec-constructor
- (list #$nscd "-f" #$nscd.conf "--foreground")
+ #$(if (nscd-use-nsncd? config)
+ #~(list #$(file-append nsncd "/bin/nsncd"))
+ #~(list #$nscd "-f" #$nscd.conf "--foreground"))
;; Wait for the PID file. However, the PID file is
;; written before nscd is actually listening on its
;; socket (XXX).
- #:pid-file "/var/run/nscd/nscd.pid"
+ #$@(if (nscd-use-nsncd? config) '() '(#:pid-file
"/var/run/nscd/nscd.pid"))
#:environment-variables
(list (string-append "LD_LIBRARY_PATH="
--
2.41.0
- [bug#71064] [PATCH 0/7] Nsncd: Introduce package + nscd service update, picnoir, 2024/05/19
- [bug#71064] [PATCH 4/7] gnu: Add rust-temp-env-0.3., picnoir, 2024/05/19
- [bug#71064] [PATCH 1/7] gnu: Add rust-libc-0.2.153., picnoir, 2024/05/19
- [bug#71064] [PATCH 2/7] gnu: Add rust-nix-0.28., picnoir, 2024/05/19
- [bug#71064] [PATCH 5/7] gnu: Add rust-slog-async-2-8., picnoir, 2024/05/19
- [bug#71064] [PATCH 7/7] gnu: services: nscd: add Nsncd optional support.,
picnoir <=
- [bug#71064] [PATCH 3/7] gnu: Add rust-dns-lookup-2., picnoir, 2024/05/19
- [bug#71064] [PATCH 6/7] gnu: Add nsncd., picnoir, 2024/05/19