From: Ruben Kerkhof Date: Tue, 5 Jun 2018 15:10:13 +0000 (+0200) Subject: redhat: spec file: all supported Fedora versions use systemd X-Git-Tag: frr-6.1-dev~289^2~9 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a999f98cc594ce6e8f439e59653c85baeb5903f7;p=matthieu%2Ffrr.git redhat: spec file: all supported Fedora versions use systemd Signed-off-by: Ruben Kerkhof --- diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index 730dc39572..58fc20b3a8 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -55,10 +55,10 @@ #### Check for systemd or init.d (upstart) # Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7) -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210 +%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210 %global initsystem systemd %else -%if (0%{?fedora} && 0%{?fedora} < 15) || (0%{?rhel} && 0%{?rhel} < 7) +%if 0%{?rhel} && 0%{?rhel} < 7 %global initsystem upstart %else %{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `readlink -f /sbin/init` = /usr/lib/systemd/systemd ]]; then echo systemd; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)}