From: Scott Shambarger Date: Mon, 16 May 2022 00:30:50 +0000 (-0700) Subject: cephadm: preserve cephadm user during RPM upgrade X-Git-Tag: v18.0.0~793^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c881fd97c2e2f73b36028f6002e670ca449c4404;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 --- diff --git a/ceph.spec.in b/ceph.spec.in index 3042d6e0dc975..dd2feb1d562cc 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