From ee958fd0664bcc3be7e3d1a489af6886ed193a04 Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Fri, 20 Oct 2017 18:19:36 -0700 Subject: [PATCH] redhat: Add posttrans scriptlet as a temp fix for missing restart during upgrade Signed-off-by: Martin Winter --- redhat/frr.spec.in | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index 9d8380e4b..25e739898 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -434,7 +434,7 @@ if [ ! -e %{_sysconfdir}/vtysh.conf ]; then fi %postun -if [ "$1" -ge 1 ]; then +if [ $1 -ge 1 ]; then # # Upgrade from older version # @@ -471,6 +471,17 @@ fi %endif /sbin/install-info --delete %{_infodir}/frr.info.gz %{_infodir}/dir +%posttrans +# We screwed up and didn't correctly add the restart to the RPM script +# with the previous version. postun script is run from the previous version, +# so the fix won't work until the next time. +# We add an additional restart here which should be removed in future +# major versions +%if "%{initsystem}" == "systemd" + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart frr.service >/dev/null 2>&1 || : +%endif + %clean %if !0%{?keep_build:1} rm -rf %{buildroot} @@ -564,6 +575,8 @@ rm -rf %{buildroot} * Fri Oct 20 2017 Martin Winter - %{version} - Fix script location for watchfrr restart functions in daemon config - Fix postun script to restart frr during upgrade +- Add posttrans script to fix missing restart in postun script from 2.0 rpm + package. Will be removed in next major version > 3 again * Mon Jun 5 2017 Martin Winter - added NHRP daemon -- 2.39.2