Decrease steps necessary to upgrading RPM packages fixed
in %postun part and not call sysctl when VPP package is
upgrading provide by condition for sysctl --system
in %post part.
@@ -230,7 +230,9 @@ done
%{_mu_build_dir}/scripts/remove-rpath %{buildroot}
%post
+if [ $1 -eq 1 ] ; then
sysctl --system
+fi
%systemd_post vpp.service
%preun
@@ -238,7 +240,8 @@ sysctl --system
%postun
%systemd_postun
-
+if [ $1 -eq 0 ] ; then
+ echo "Uninstalling, unbind user-mode PCI drivers"
# Unbind user-mode PCI drivers
removed=
pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_generic -o -name vfio-pci`
@@ -256,6 +259,9 @@ if [ -n "${removed}" ]; then
else
echo "There weren't PCI devices binded"
fi
+else
+ echo "Upgrading package, dont' unbind interfaces"
+fi
%files
%defattr(-,bin,bin)
