From 3b349ea9443234f444b2f2f78611df9c408085b5 Mon Sep 17 00:00:00 2001 From: Scott Shambarger Date: Sun, 15 May 2022 17:30:50 -0700 Subject: [PATCH] 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) --- ceph.spec.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 9f522a750b786..608f495b37b5f 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 -- 2.39.5