David Craven <da...@craven.ch> writes:

> * gnu/build/activation.scm (activate-user): Make sure /var/lib exists.
> ---
>  gnu/build/activation.scm | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
> index 10aa58d..3abfdd6 100644
> --- a/gnu/build/activation.scm
> +++ b/gnu/build/activation.scm
> @@ -233,6 +233,9 @@ numeric gid or #f."
>    ;; 'groupadd' aborts if the file doesn't already exist.
>    (touch "/etc/group")
>
> +  ;; allow /var/lib/application to be a home directory
> +  (mkdir-p "/var/lib")
> +
The comment is misleading, I think a better one is:
  allow home directories to be created under /var/lib.

Also, it's better fit in the 'add-user' procudere, before
the run of `useradd' command.  And instead of handing
this particular case, how about create any parent directory
of HOME?  like:

[...]
  ;; create the parent directory of HOME.
  (when home (mkdir-p (dirname home)))
  
  ;; Use 'useradd' from the Shadow package.
[...]

Reply via email to