mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
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.
This commit is contained in:
parent
1fd0fc0db4
commit
49f9d7f697
1 changed files with 8 additions and 1 deletions
|
@ -1149,7 +1149,14 @@ (define nscd-activation
|
|||
#~(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)
|
||||
|
|
Loading…
Reference in a new issue