New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postrm script should not fail #11678
Conversation
@spinscale can you have a look when you have time please? No hurry, thanks :) |
fi | ||
fi | ||
|
||
if [ "$REMOVE_USER_AND_GROUP" = "true" ]; then | ||
if id "$ES_USER" > /dev/null 2>&1 ; then | ||
userdel "$ES_USER" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can delete the user/group usually means that there is still a process running under that user.
Doing this is bad practice in general :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose you mean "If you can't" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry yes indeed. if you can't :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok :)
Doing this is bad practice in general :-)
What's your suggestion here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering about the same, userdel with a useful error message sounds good at first glance
This commit changes the postrm script so that it prints error messages instead of failing & exiting when the deletion of a directory failed while removing a RPM/DEB package. Closes elastic#11373
@electrical @spinscale I merged this without the |
This commit changes the postrm script so that it prints error messages instead of failing & exiting when the deletion of directories failed while removing a RPM/DEB package.
Closes #11373