[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/9] activation: Allow /var/lib to be a home directory.
From: |
宋文武 |
Subject: |
Re: [PATCH 2/9] activation: Allow /var/lib to be a home directory. |
Date: |
Fri, 02 Sep 2016 19:54:38 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
David Craven <address@hidden> 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.
[...]
Re: [PATCH 2/9] activation: Allow /var/lib to be a home directory., Ludovic Courtès, 2016/09/03
[PATCH 4/9] services: syslog: Use syslog-configuration., David Craven, 2016/09/01
Re: [PATCH 1/9] system: vm: Remove -net user flag., ng0, 2016/09/02