From fb6d4bfd4e70c8587d408b77fc0d3e59ae993283 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 cfd993cfa131..c31f81752814 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1528,8 +1528,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.47.3