epel7 systemd complains due to keyword differences

This commit is contained in:
James Hogarth 2017-04-06 00:27:13 +01:00
parent b74be06ceb
commit 1781f65a8b
2 changed files with 28 additions and 0 deletions

20
lldpd-el7.service Normal file
View File

@ -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

View File

@ -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 <james.hogarth@gmail.com> - 0.9.7-4
- EPEL7 systemd needs an older syntax
* Wed Apr 05 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-3
- Use the official release tarball rather than the github snapshot
- Add EPEL6 conditionals