[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/09: services: nscd: Create /etc/resolv.conf if it does not exist.
From: |
Ludovic Courtès |
Subject: |
08/09: services: nscd: Create /etc/resolv.conf if it does not exist. |
Date: |
Tue, 2 May 2017 06:33:05 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 49f9d7f697d19870f01104cdb6a90a32aea87679
Author: Ludovic Courtès <address@hidden>
Date: Tue May 2 12:21:31 2017 +0200
services: nscd: Create /etc/resolv.conf if it does not exist.
* gnu/services/base.scm (nscd-activation): Create /etc/resolv.conf if it
does not exist yet.
---
gnu/services/base.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 67972bf..a64faa0 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1149,7 +1149,14 @@ the tty to run, among other things."
#~(begin
(use-modules (guix build utils))
(mkdir-p "/var/run/nscd")
- (mkdir-p "/var/db/nscd"))) ;for the persistent cache
+ (mkdir-p "/var/db/nscd") ;for the persistent cache
+
+ ;; In libc 2.25 nscd uses inotify to watch /etc/resolv.conf, but only if
+ ;; that file exists when it is started. Thus create it here.
+ (unless (file-exists? "/etc/resolv.conf")
+ (call-with-output-file "/etc/resolv.conf"
+ (lambda (port)
+ (display "# This is a placeholder.\n" port))))))
(define nscd-service-type
(service-type (name 'nscd)
- branch master updated (7020a6a -> 8a21050), Ludovic Courtès, 2017/05/02
- 01/09: publish: Use a larger zlib buffer for compression with '--cache'., Ludovic Courtès, 2017/05/02
- 02/09: gnu: emacs-emms: Update to 4.3., Ludovic Courtès, 2017/05/02
- 05/09: gnu: libiconv: Update to 1.15., Ludovic Courtès, 2017/05/02
- 03/09: gnu: acct: Update to 6.6.3., Ludovic Courtès, 2017/05/02
- 06/09: gnu: ocrad: Update to 0.26., Ludovic Courtès, 2017/05/02
- 07/09: gnu: parallel: Update to 20170422., Ludovic Courtès, 2017/05/02
- 04/09: gnu: less: Update to 487., Ludovic Courtès, 2017/05/02
- 08/09: services: nscd: Create /etc/resolv.conf if it does not exist.,
Ludovic Courtès <=
- 09/09: substitute: Validate substitute URLs., Ludovic Courtès, 2017/05/02