]> git.proxmox.com Git - mirror_frr.git/commitdiff
redhat: Add posttrans scriptlet as a temp fix for missing restart during upgrade
authorMartin Winter <mwinter@opensourcerouting.org>
Sat, 21 Oct 2017 01:19:36 +0000 (18:19 -0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Sat, 21 Oct 2017 01:30:49 +0000 (18:30 -0700)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
redhat/frr.spec.in

index 9d8380e4b2e1e4dd5967e280710188a534d705f5..25e73989893fbd922546cf0039c3b349f9569071 100644 (file)
@@ -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 <mwinter@opensourcerouting.org> - %{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 <mwinter@opensourcerouting.org>
 - added NHRP daemon