[gentoo-dev] [PATCH] acct-user.eclass: improve error message when usermod fails

2023-06-24 Thread Mike Gilbert
usermod refuses to update the home directory for a user with running processes. Output a more helpful message and avoid calling die for this. For other usermod failures, output stderr as an eerror message and die. Example output: * Failed to update user portage * This user currently has one or

Re: [gentoo-dev] [PATCH] acct-user.eclass: improve error message when usermod fails

2023-06-25 Thread Florian Schmaus
On 24/06/2023 19.01, Mike Gilbert wrote: usermod refuses to update the home directory for a user with running processes. Output a more helpful message and avoid calling die for this. For other usermod failures, output stderr as an eerror message and die. Example output: * Failed to update us

Re: [gentoo-dev] [PATCH] acct-user.eclass: improve error message when usermod fails

2023-06-25 Thread Mike Gilbert
On Sun, Jun 25, 2023 at 6:54 AM Florian Schmaus wrote: > No strong opinion, but it is often a good idea to include the exit > status. For example: > > die "usermod failed (${status})" That's a really good idea. It could also be applied to the useradd/groupadd/groupmod comm