From: Donald Sharp Date: Wed, 30 May 2018 11:53:28 +0000 (-0400) Subject: redhat: Fix old systems on upgrade path X-Git-Tag: frr-4.0.1~8^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4daa32f67c353031f1962dbb3b70a015321798f7;p=mirror%2Ffrr.git redhat: Fix old systems on upgrade path Fix old systems in upgrade path to enable watchfrr when upgrading. Signed-off-by: Donald Sharp --- diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index 00ef0616e8..ecf5f63dff 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -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.