From 1781f65a8bfdddbaa3a433d0f9a5c407dcf3566b Mon Sep 17 00:00:00 2001 From: James Hogarth Date: Thu, 6 Apr 2017 00:27:13 +0100 Subject: [PATCH] epel7 systemd complains due to keyword differences --- lldpd-el7.service | 20 ++++++++++++++++++++ lldpd.spec | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 lldpd-el7.service diff --git a/lldpd-el7.service b/lldpd-el7.service new file mode 100644 index 0000000..93bee22 --- /dev/null +++ b/lldpd-el7.service @@ -0,0 +1,20 @@ +[Unit] +Description=LLDP daemon +Documentation=man:lldpd(8) +After=network.target + +[Service] +Type=notify +NotifyAccess=main +EnvironmentFile=-/etc/sysconfig/lldpd +ExecStart=/usr/sbin/lldpd $DAEMON_ARGS $LLDPD_OPTIONS +Restart=on-failure +PrivateTmp=yes +RestrictAddressFamilies=AF_INET AF_INET6 AF_PACKET AF_NETLINK AF_UNIX +ProtectHome=yes +ReadWriteDirectories=/var/run/lldpd +ProtectSystem=full + +[Install] +WantedBy=multi-user.target + diff --git a/lldpd.spec b/lldpd.spec index 67d3b65..c633e2c 100644 --- a/lldpd.spec +++ b/lldpd.spec @@ -20,6 +20,7 @@ Source1: %{name}-fedora.service Source2: %{name}-tmpfiles Source3: %{name}-fedora.sysconfig Source4: %{name}-el6.init +Source5: %{name}-el7.service BuildRequires: readline-devel BuildRequires: check-devel @@ -78,7 +79,11 @@ make %{?_smp_mflags} %make_install %if 0%{?with_systemd} +%if 0%{?fedora} install -p -D -m644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service +%else +install -p -D -m644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}.service +%endif install -p -D -m644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf %else install -p -D -m755 %{SOURCE4} %{buildroot}%{_initddir}/%{name} @@ -165,6 +170,9 @@ fi %changelog +* Wed Apr 05 2017 James Hogarth - 0.9.7-4 +- EPEL7 systemd needs an older syntax + * Wed Apr 05 2017 James Hogarth - 0.9.7-3 - Use the official release tarball rather than the github snapshot - Add EPEL6 conditionals