From b4274a2befb0f61e062e0b7ec9b133a2e575b118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20L=C3=B3pez=20Gonz=C3=A1lez?= Date: Mon, 20 Sep 2021 14:08:33 +0100 Subject: [PATCH] WIP: doc --- doc/attributes.md | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/doc/attributes.md b/doc/attributes.md index f0ad37f04..c1e09af40 100644 --- a/doc/attributes.md +++ b/doc/attributes.md @@ -80,27 +80,46 @@ Y2Users::Home #create_mode #create_with_content #move_content + #adapt_ownership #keep_old ~~~ * Use cases * create a new user with a home (`home#path` is not empty) - * with/without home on disk (`home#create_on_disk`) - * with/without content (`home#create_with_content`) - * as dir/subvolume (`home#create_as_btrfs_subvol`) - * with custom permissions (`home#create_mode`) + * if the path already exists: + * adapt ownership (`#home#adapt_ownership`) + * if the path does not exist: + * with/without home on disk (`home#create_on_disk`) + * with/without content (`home#create_with_content`) + * as dir/subvolume (`home#create_as_btrfs_subvol`) + * with custom permissions (`home#create_mode`) * create a new user without a home (`home#path` is empty) * edit a user and add a home (`home#path` is not empty anymore) - * should we use *mkhomedir_helper* ? - * with/without home on disk (`home#create_on_disk`) - * with/without content (`home#create_with_content`) - * `home#create_as_btrfs_subvol` does not apply (see *mkhomedir_helper*) - * `home#create_mode` does not apply (see *mkhomedir_helper*) + * if the path already exists: + * adapt ownership (`#home#adapt_ownership`) + * if the path does not exist: + * should we use *mkhomedir_helper* ? + * with/without home on disk (`home#create_on_disk`) + * with/without content (`home#create_with_content`) + * `home#create_as_btrfs_subvol` does not apply (see *mkhomedir_helper*) + * `home#create_mode` does not apply (see *mkhomedir_helper*) * edit a user and change the home (`home#path` changes) - * with/without home on disk (`home#create_on_disk`) - * with/without content (`home#create_with_content`) - * `home#create_as_btrfs_subvol` does not apply (see *usermod*) - * `home#create_mode` does not apply (see *usermod*) + * if the path already exists: + * adapt ownership (`#home#adapt_ownership`) + * if the path does not exist: + * move content (`home#move_content`) + * do not move content: + * with/without home on disk (`home#create_on_disk`) + * with/without content (`home#create_with_content`) + * `home#create_as_btrfs_subvol` does not apply (see *usermod*, *mkhomedir_helper*) + * `home#create_mode` does not apply (see *usermod*, *mkhomedir_helper*) + * keep/remove old home (`home#keep_old`) + * edit a user and remove the home (`home#path` is empty) + * `home#create_on_disk` does not apply + * `home#create_with_content` does not apply + * `home#create_as_btrfs_subvol` does not apply + * `home#create_mode` does not apply + * `home#move_content` does not apply * keep/remove old home (`home#keep_old`) * delete a user * keep/remove old home (`home#keep_old` ?)