summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-08-24 16:20:46 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-08-26 09:29:04 +0900
commit836beed08e1d392fb3686852ecc749d9cd3117a7 (patch)
tree32d1369b752d9335916ed5d2c3145ee2aed49a32 /gnu/services
parent5b54f83d875d968d578b1595e9fd290dbdf03d9b (diff)
Revert "services: nscd: Create /etc/resolv.conf if it does not exist."
This reverts commits 49f9d7f697d19870f01104cdb6a90a32aea87679 and c298fb133acbdc17e05a79c10ab9a9e214368264. Since glibc version 2.22 (Guix was already on 2.25 when these commits were introduced), nscd's inotify support is improved and can track a newly added /etc/resolv.conf. There is no need to create it beforehand. Fixes: #10192 Reported-by: brian cully <bjc@spork.org>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm11
1 files changed, 1 insertions, 10 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e5062a72113..5108187d1ee 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1639,16 +1639,7 @@ the tty to run, among other things."
1639 #~(begin 1639 #~(begin
1640 (use-modules (guix build utils)) 1640 (use-modules (guix build utils))
1641 (mkdir-p "/var/run/nscd") 1641 (mkdir-p "/var/run/nscd")
1642 (mkdir-p "/var/db/nscd") ;for the persistent cache 1642 (mkdir-p "/var/db/nscd"))) ;for the persistent cache
1643
1644 ;; In libc 2.25 nscd uses inotify to watch /etc/resolv.conf, but only if
1645 ;; that file exists when it is started. Thus create it here. Note: on
1646 ;; some systems, such as when NetworkManager is used, /etc/resolv.conf
1647 ;; is a symlink, hence 'lstat'.
1648 (unless (false-if-exception (lstat "/etc/resolv.conf"))
1649 (call-with-output-file "/etc/resolv.conf"
1650 (lambda (port)
1651 (display "# This is a placeholder.\n" port))))))
1652 1643
1653(define nscd-service-type 1644(define nscd-service-type
1654 (service-type (name 'nscd) 1645 (service-type (name 'nscd)