]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: preserve cephadm user during RPM upgrade 46272/head
authorScott Shambarger <devel@shambarger.net>
Mon, 16 May 2022 00:30:50 +0000 (17:30 -0700)
committerScott Shambarger <devel@shambarger.net>
Mon, 16 May 2022 00:30:50 +0000 (17:30 -0700)
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 <devel@shambarger.net>
ceph.spec.in

index 3042d6e0dc975e5f34caf3136483e097dd01d35c..dd2feb1d562cc1103090d0abaccbe7355ef7b665 100644 (file)
@@ -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