Skip to content

Commit

Permalink
SPEC: don't fail uninstallation if 'alternatives' fails
Browse files Browse the repository at this point in the history
This is seen on rpm-ostree based system during uninstall:
```
Running scriptlet: sssd-client-2.9.5-4.el9.x86_64 9/9
admindir /var/lib/alternatives invalid
error: %preun(sssd-client-2.9.5-4.el9.x86_64) scriptlet failed, exit status 2
```

This should be fixed by fedora-sysv/chkconfig#135
but let's avoid hard failing here anyway.
  • Loading branch information
alexey-tikhonov committed Sep 12, 2024
1 parent 0be58a2 commit d914df6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "Us

%preun client
if [ $1 -eq 0 ] ; then
/usr/sbin/alternatives --remove cifs-idmap-plugin %{_libdir}/cifs-utils/cifs_idmap_sss.so
/usr/sbin/alternatives --remove cifs-idmap-plugin %{_libdir}/cifs-utils/cifs_idmap_sss.so || true
fi

%posttrans common
Expand Down

0 comments on commit d914df6

Please sign in to comment.