summaryrefslogtreecommitdiff
path: root/gnu/build/activation.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-11-20 01:14:12 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-11-20 01:14:12 +0100
commit4f70db97a040b35f125484ce8885766ca5807dd4 (patch)
tree30274f4a57e4a149127125fb6df626dd1d9f9cf0 /gnu/build/activation.scm
parent2d546858b139e5fcf2cbdf9958a17fd98803ac4c (diff)
parent9acfe275adf1bc27483ba58c6d86a84ba20aa08f (diff)
downloadpatches-4f70db97a040b35f125484ce8885766ca5807dd4.tar
patches-4f70db97a040b35f125484ce8885766ca5807dd4.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/build/activation.scm')
-rw-r--r--gnu/build/activation.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 68ecd6bc71..0e77677de1 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -148,11 +148,15 @@ properties. Return #t on success."
`("-G" ,(string-join supplementary-groups ","))
'())
,@(if comment `("-c" ,comment) '())
- ,@(if (and home create-home?)
- (if (file-exists? home)
- `("-d" ,home) ; avoid warning from 'useradd'
- `("-d" ,home "--create-home"))
+ ,@(if home `("-d" ,home) '())
+
+ ;; Home directories of non-system accounts are created by
+ ;; 'activate-user-home'.
+ ,@(if (and home create-home? system?
+ (not (file-exists? home)))
+ '("--create-home")
'())
+
,@(if shell `("-s" ,shell) '())
,@(if password `("-p" ,password) '())
,@(if system? '("--system") '())
@@ -229,10 +233,7 @@ numeric gid or #f."
#:supplementary-groups supplementary-groups
#:comment comment
#:home home
-
- ;; Home directories of non-system accounts are created by
- ;; 'activate-user-home'.
- #:create-home? (and create-home? system?)
+ #:create-home? create-home?
#:shell shell
#:password password)