[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/07: services: nscd: Adjust activation snippet for /etc/resolv.conf sy
From: |
Ludovic Courtès |
Subject: |
04/07: services: nscd: Adjust activation snippet for /etc/resolv.conf symlinks. |
Date: |
Mon, 8 May 2017 10:29:32 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit c298fb133acbdc17e05a79c10ab9a9e214368264
Author: Ludovic Courtès <address@hidden>
Date: Mon May 8 15:07:52 2017 +0200
services: nscd: Adjust activation snippet for /etc/resolv.conf symlinks.
Fixes <http://bugs.gnu.org/26809>.
Reported by Mark H Weaver <address@hidden>.
* gnu/services/base.scm (nscd-activation): Use 'lstat' instead of
'file-exists?'.
---
gnu/services/base.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index a64faa0..c244174 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1152,8 +1152,10 @@ the tty to run, among other things."
(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")
+ ;; 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))))))
- branch master updated (087efec -> a7e5944), Ludovic Courtès, 2017/05/08
- 02/07: maint: Use 'G_' in build-aux/ scripts., Ludovic Courtès, 2017/05/08
- 07/07: maint: Check whether binaries cross-built to "arm-linux-gnueabihf" are available., Ludovic Courtès, 2017/05/08
- 05/07: maint: Add bayfront.guixsd.org signing key., Ludovic Courtès, 2017/05/08
- 03/07: maint: "distcheck" inherits the test root directory., Ludovic Courtès, 2017/05/08
- 04/07: services: nscd: Adjust activation snippet for /etc/resolv.conf symlinks.,
Ludovic Courtès <=
- 01/07: gnu: perl-net-dns-resolver-programmable: Shorten patch file name., Ludovic Courtès, 2017/05/08
- 06/07: maint: 'check-available-binaries' forces use of the official servers., Ludovic Courtès, 2017/05/08