From c881fd97c2e2f73b36028f6002e670ca449c4404 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 --- ceph.spec.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 3042d6e0dc97..dd2feb1d562c 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1579,8 +1579,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