diff options
Diffstat (limited to 'gnu/services/base.scm')
-rw-r--r-- | gnu/services/base.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 67972bf614..c244174fd3 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1149,7 +1149,16 @@ 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. Note: on + ;; some systems, such as when NetworkManager is used, /etc/resolv.conf + ;; is a symlink, hence 'lstat'. + (unless (false-if-exception (lstat "/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) |