Don't throw script errors when ordered before udev

Due to the way libdnf/libsolv resolves RPM installation order, it is
possible that this package will be installed before systemd-udev is
installed. If that happens, /sbin/udevadm is unavailable and an error
is thrown. However, it's safe to skip the call to /sbin/udevadm if
systemd-udev is not available yet. When that package is installed,
it runs the necessary actions itself.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2020-07-02 09:04:38 -04:00
parent abad9da95a
commit c166c357f6
No known key found for this signature in database
GPG Key ID: 45DB85A568286D11
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: rdma-core
Version: 30.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: RDMA core userspace libraries and daemons
# Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license
@ -356,9 +356,11 @@ rm -f %{buildroot}/%{_sbindir}/srp_daemon.sh
%ldconfig_scriptlets -n librdmacm
%post -n rdma-core
if [ -x /sbin/udevadm ]; then
/sbin/udevadm trigger --subsystem-match=infiniband --action=change || true
/sbin/udevadm trigger --subsystem-match=net --action=change || true
/sbin/udevadm trigger --subsystem-match=infiniband_mad --action=change || true
fi
%post -n ibacm
%systemd_post ibacm.service
@ -660,6 +662,9 @@ rm -f %{buildroot}/%{_sbindir}/srp_daemon.sh
%endif
%changelog
* Thu Jul 02 2020 Stephen Gallagher <sgallagh@redhat.com> - 30.0-4
- Don't throw script errors if udev is not installed
* Wed Jul 1 2020 Jeff Law <law@redhat.com> - 30.0-3
- Disable LTO