From 0cd045c7fe213af3666466091545cd3d20affdf7 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 17 Dec 2019 17:48:23 +0100 Subject: [PATCH] add post scriptlet for update --- cups-filters.spec | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cups-filters.spec b/cups-filters.spec index 3902d7f..84bb788 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -203,6 +203,23 @@ make check %post %systemd_post cups-browsed.service +# put UpdateCUPSQueuesMaxPerCall and PauseBetweenCUPSQueueUpdates into cups-browsed.conf +# for making cups-browsed work more stable for environments with many print queues +# remove this after 1-2 releases +for directive in "UpdateCUPSQueuesMaxPerCall" "PauseBetweenCUPSQueueUpdates" +do + found=`%{_bindir}/grep "^[[:blank:]]*$directive" %{_sysconfdir}/cups/cups-browsed.conf` + if [ -z "$found" ] + then + if [ "x$directive" == "xUpdateCUPSQueuesMaxPerCall" ] + then + %{_bindir}/echo "UpdateCUPSQueuesMaxPerCall 20" >> %{_sysconfdir}/cups/cups-browsed.conf + else + %{_bindir}/echo "PauseBetweenCUPSQueueUpdates 5" >> %{_sysconfdir}/cups/cups-browsed.conf + fi + fi +done + %preun %systemd_preun cups-browsed.service @@ -285,6 +302,7 @@ make check %changelog * Mon Dec 16 2019 Zdenek Dohnal - 1.26.0-1 - 1.26.0 +- add post scriptlet for update * Tue Nov 26 2019 Zdenek Dohnal - 1.22.5-10 - 1776271 - Updated cups-browsed in RHEL 7.7 leaks sockets