From: Scott Shambarger Date: Mon, 16 May 2022 00:30:50 +0000 (-0700) Subject: cephadm: preserve cephadm user during RPM upgrade X-Git-Tag: v17.2.4~219^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b349ea9443234f444b2f2f78611df9c408085b5;p=ceph.git cephadm: preserve cephadm user during RPM upgrade The cephadm postun macro in the rpm spec file doesn't test for upgrade, and removes the cephadm user. The patch changes the macro to only remove the cephadm user on uninstall. Fixes: https://tracker.ceph.com/issues/55664 Signed-off-by: Scott Shambarger (cherry picked from commit c881fd97c2e2f73b36028f6002e670ca449c4404) --- diff --git a/ceph.spec.in b/ceph.spec.in index 9f522a750b78..608f495b37b5 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1575,8 +1575,7 @@ exit 0 %if ! 0%{?suse_version} %postun -n cephadm -userdel -r cephadm || true -exit 0 +[ $1 -ne 0 ] || userdel cephadm || : %endif %files -n cephadm