Skip to content
Snippets Groups Projects
Unverified Commit 49f9d7f6 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent 1fd0fc0d
No related branches found
No related tags found
No related merge requests found
...@@ -1149,7 +1149,14 @@ (define nscd-activation ...@@ -1149,7 +1149,14 @@ (define nscd-activation
#~(begin #~(begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(mkdir-p "/var/run/nscd") (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 (define nscd-service-type
(service-type (name 'nscd) (service-type (name 'nscd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment