summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-06-04 23:08:09 +0200
committerLudovic Courtès <ludo@gnu.org>2014-06-04 23:08:09 +0200
commite2fcc23a3a562b9efa55530f442bba4bd0436d4f (patch)
tree652fced6e7a7bf404dfb07f6c8f4292efc13477f
parent185f669109eb56b61c3d51dc8b2e3eeded9b2be9 (diff)
downloadgnu-guix-e2fcc23a3a562b9efa55530f442bba4bd0436d4f.tar
gnu-guix-e2fcc23a3a562b9efa55530f442bba4bd0436d4f.tar.gz
activation: Only create groups that do not exist yet.
Before that the effect would be to re-create groups at each boot, and thus remove any members of the groups. * guix/build/activation.scm (activate-users+groups): Call 'add-group' only when (getgrname name) fails.
-rw-r--r--guix/build/activation.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/build/activation.scm b/guix/build/activation.scm
index 62e69a9152..bc62a94e01 100644
--- a/guix/build/activation.scm
+++ b/guix/build/activation.scm
@@ -126,7 +126,8 @@ numeric gid or #f."
;; Then create the groups.
(for-each (match-lambda
((name password gid)
- (add-group name #:gid gid #:password password)))
+ (unless (false-if-exception (getgrnam name))
+ (add-group name #:gid gid #:password password))))
groups)
;; Finally create the other user accounts.