Hi,

Interesting POV.  (opt-in vs. automatic)

> -----Original Message-----
> From: Marc Haber <[email protected]>
> To: Osamu Aoki <[email protected]>, [email protected],
> [email protected]
> Cc: Nicholas D Steeves <[email protected]>
> Subject: Re: Bug#863751: Add --btrfs-subvolume-home option to adduser
> Date: Tue, 8 Mar 2022 07:46:58 +0100
> 
> Control: retitle -1 use useradd's --btrfs-subvolume-home option
> thanks
> 
> On Sun, Feb 21, 2021 at 08:52:39PM +0900, Osamu Aoki wrote:
> > The current useradd since 2019 has --btrfs-subvolume-home option.
> 
> How does this option behave if the parent of the new home directory is
> not on btrfs? adduser could add this option to all useradd calls but
> this would only be possible if useradd will _silently_ ignore the option
> if the parent directory is not btrfs and of course create a normal
> directory in that case. If the operation is not silent, package
> maintainers are going to redirect adduser's output to /dev/null which is
> not desired from adduser's pov.
> 
> Greetings
> Marc

I was thinking opt-in only.

I mean to add an opt-in --btrfs-subvolume-home option to adduser so the user 
can use
this feature if he requests.  I didn't think beyond.  (I didn't test it on 
non-btrfs
system so I don't know the answer to your question.  Whoever specifies it in 
command
line, he should know it.)

As I come to think of this, since it is trivial to check FS of /home in adduser 
in
advance by calling a basic shell command as:

```
 $ stat -f -c %T /home
btrfs
```
, adding this feature as an automatic option for pertinent system is an 
interesting
thought for adduser too.

Osamu

Reply via email to