From: Martin Winter Date: Sat, 21 Oct 2017 01:19:36 +0000 (-0700) Subject: redhat: Add posttrans scriptlet as a temp fix for missing restart during upgrade X-Git-Tag: FRR-3.0.1~5^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ee958fd0664bcc3be7e3d1a489af6886ed193a04;p=mirror%2Ffrr.git redhat: Add posttrans scriptlet as a temp fix for missing restart during upgrade Signed-off-by: Martin Winter --- diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index 9d8380e4b2..25e7398989 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