With SELinux enabled, a local rpm install would have the useradd command fail to create the /opt/kafka directory, and the package install would fail. The exit 0 fixes this and rpm itself is able to create the directory just fine after %pre is run.
Also, since the kafka user is a system user, the -m was removed since it is not useful to have skel files copied to /opt/kafka (dot bash files).
Fix (silently) broken postun scriplet.
With SELinux enabled, a local rpm install would have the useradd command fail to create the /opt/kafka directory, and the package install would fail. The exit 0 fixes this and rpm itself is able to create the directory just fine after %pre is run.
Also, since the kafka user is a system user, the -m was removed since it is not useful to have skel files copied to /opt/kafka (dot bash files).