From f01efec09a1eaa5308493eee830e827caf494eb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Thu, 26 Jun 2014 23:31:17 +0200
Subject: [PATCH] activation: Preserve /etc/groups upon reboots.

This is a followup to e2fcc23.  The /etc/group file would be cleared
when booting.

* guix/build/activation.scm (activate-users+groups)[touch]: Rewrite so
  it does not wipe out FILE's contents.
---
 guix/build/activation.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/activation.scm b/guix/build/activation.scm
index bc62a94e017..12c1ca142dd 100644
--- a/guix/build/activation.scm
+++ b/guix/build/activation.scm
@@ -93,7 +93,7 @@ (define (activate-users+groups users groups)
 each item in GROUPS is a tuple with the group name, group password or #f, and
 numeric gid or #f."
   (define (touch file)
-    (call-with-output-file file (const #t)))
+    (close-port (open-file file "a0b")))
 
   (define activate-user
     (match-lambda
-- 
GitLab