]> git.proxmox.com Git - mirror_frr.git/commitdiff
redhat: Fix rpm scripts to correctly restart daemons on upgrade
authorMartin Winter <mwinter@opensourcerouting.org>
Fri, 20 Oct 2017 23:33:39 +0000 (16:33 -0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Fri, 20 Oct 2017 23:33:39 +0000 (16:33 -0700)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
redhat/frr.spec.in

index 26f0a980d01c01cc045dae42bf7be3c55db5feec..9d8380e4b2e1e4dd5967e280710188a534d705f5 100644 (file)
@@ -442,7 +442,7 @@ if [ "$1" -ge 1 ]; then
         ##
         ## Systemd Version
         ##
-        %systemd_postun frr.service
+        %systemd_postun_with_restart frr.service
     %else
         ##
         ## init.d Version
@@ -457,18 +457,14 @@ fi
     ##
     ## Systemd Version
     ##
-    if [ "$1" = "0" ]; then
-        for daemon in %all_daemons ; do
-            if [ x"${daemon}" != x"" ] ; then
-                %systemd_preun frr.service
-            fi
-        done
+    if [ $1 -eq 0 ] ; then
+        %systemd_preun frr.service
     fi
 %else
     ##
     ## init.d Version
     ##
-    if [ "$1" = "0" ]; then
+    if [ $1 -eq 0 ] ; then
         /etc/rc.d/init.d/frr stop  >/dev/null 2>&1
         /sbin/chkconfig --del frr
     fi
@@ -567,6 +563,7 @@ rm -rf %{buildroot}
 %changelog
 * 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
 
 * Mon Jun  5 2017 Martin Winter <mwinter@opensourcerouting.org>
 - added NHRP daemon