mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
activation: Silence warning from 'useradd'.
* guix/build/activation.scm (add-user): Don't pass '--create-home' when HOME already exists.
This commit is contained in:
parent
7f17ff7841
commit
f3b692acdd
1 changed files with 5 additions and 1 deletions
|
@ -73,7 +73,11 @@ (define* (add-user name group
|
|||
`("-G" ,(string-join supplementary-groups ","))
|
||||
'())
|
||||
,@(if comment `("-c" ,comment) '())
|
||||
,@(if home `("-d" ,home "--create-home") '())
|
||||
,@(if home
|
||||
(if (file-exists? home)
|
||||
`("-d" ,home) ; avoid warning from 'useradd'
|
||||
`("-d" ,home "--create-home"))
|
||||
'())
|
||||
,@(if shell `("-s" ,shell) '())
|
||||
,@(if password `("-p" ,password) '())
|
||||
,name)))
|
||||
|
|
Loading…
Reference in a new issue