]> git.puffer.fish Git - mirror/frr.git/commitdiff
redhat: Fix old systems on upgrade path 2342/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 30 May 2018 11:53:28 +0000 (07:53 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 31 May 2018 23:35:13 +0000 (19:35 -0400)
Fix old systems in upgrade path to enable watchfrr when upgrading.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
redhat/frr.spec.in

index 00ef0616e8b19d6141e8dc0e3045020cded59c43..ecf5f63dffa3347bda7031f2ae95daf8a01e40b8 100644 (file)
@@ -430,6 +430,12 @@ done
 #  Config files won't get replaced by default, so we do this ugly hack to fix it
 %__sed -i 's|/etc/init.d/|%{_sbindir}/|g' %{_sysconfdir}/daemons 2> /dev/null || true
 
+# With systemd, watchfrr is mandatory. Fix config to make sure it's enabled if
+# we install or upgrade to a frr built with systemd
+%if "%{initsystem}" == "systemd"
+    %__sed -i 's|watchfrr_enable=no|watchfrr_enable=yes|g' %{_sysconfdir}/daemons 2> /dev/null || true
+%endif
+
 /sbin/install-info %{_infodir}/frr.info.gz %{_infodir}/dir
 
 # Create dummy files if they don't exist so basic functions can be used.