Skip to content
Snippets Groups Projects
Commit e2fcc23a authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent 185f6691
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,8 @@ (define activate-user
;; 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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment