summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-05 22:41:55 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-05 22:41:55 +0200
commit24e02c28fbf2b0efbc2fd6cdcd770037a6cff7e3 (patch)
treeb4541b9b8e4e28b5fbe6f060895e94f7fbb01be2 /doc/guix.texi
parent847658395e399d6d4ef21a247dbad02a9c921400 (diff)
downloadguix-24e02c28fbf2b0efbc2fd6cdcd770037a6cff7e3.tar.gz
system: 'hosts-file' is now a file-like object.
Partly fixes <http://bugs.gnu.org/20720>.
Reported by Alex Kost <alezost@gmail.com>.

* gnu/system.scm (default-/etc/hosts): Change 'text-file' to 'plain-file'.
  (maybe-file->monadic): New procedure.
  (operating-system-etc-directory): Use it.
* doc/guix.texi (operating-system Reference, Networking Services): Adjust
  accordingly.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ecdfa1b1ce..f8da9c1224 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4480,9 +4480,9 @@ The host name.
 
 @item @code{hosts-file}
 @cindex hosts file
-A zero-argument monadic procedure that returns a text file for use as
+A file-like object (@pxref{G-Expressions, file-like objects}) for use as
 @file{/etc/hosts} (@pxref{Host Names,,, libc, The GNU C Library
-Reference Manual}).  The default is to produce a file with entries for
+Reference Manual}).  The default is a file with entries for
 @code{localhost} and @var{host-name}.
 
 @item @code{mapped-devices} (default: @code{'()})
@@ -5299,9 +5299,9 @@ This variable is typically used in the @code{hosts-file} field of an
   (hosts-file
     ;; Create a /etc/hosts file with aliases for "localhost"
     ;; and "mymachine", as well as for Facebook servers.
-    (text-file "hosts"
-               (string-append (local-host-aliases host-name)
-                              %facebook-host-aliases))))
+    (plain-file "hosts"
+                (string-append (local-host-aliases host-name)
+                               %facebook-host-aliases))))
 @end example
 
 This mechanism can prevent programs running locally, such as Web