diff --git a/iputils.changes b/iputils.changes index d96520c..3980ed9 100644 --- a/iputils.changes +++ b/iputils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Dec 9 08:32:23 UTC 2017 - mpluskal@suse.com + +- Add systemd service for rarpd + ------------------------------------------------------------------- Thu Nov 30 08:30:22 UTC 2017 - meissner@suse.com diff --git a/iputils.spec b/iputils.spec index 9749757..a4c3a16 100644 --- a/iputils.spec +++ b/iputils.spec @@ -23,7 +23,8 @@ Summary: IPv4 and IPv6 Networking Utilities License: BSD-3-Clause AND GPL-2.0+ Group: Productivity/Networking/Other Url: https://github.com/iputils/iputils -Source: https://github.com/iputils/iputils/archive/%{version}.tar.gz +Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz +Source1: rarpd.service Patch8: iputils-sec-ping-unblock.diff Patch9: iputils-ping-interrupt.diff # PATCH-FIX-UPSTREAM iputils-remove-bogus-check-required-for-2.4.9-kernels.patch tiwai@suse.de - boo#927831 @@ -35,6 +36,7 @@ BuildRequires: libopenssl-devel BuildRequires: opensp BuildRequires: perl-SGMLS BuildRequires: pkgconfig +BuildRequires: systemd-rpm-macros # For Makefile modifications BuildRequires: sed BuildRequires: pkgconfig(libidn) @@ -52,6 +54,7 @@ rdisc, ping, arping and tracepath. %package -n rarpd Summary: Reverse Address Resolution Protocol Daemon Group: Productivity/Networking/System +%systemd_requires %description -n rarpd Rarpd listens on the Ethernet for broadcast packets asking for reverse @@ -117,12 +120,28 @@ rm doc/tftpd* doc/traceroute* # Install the rest install -m 644 doc/*.8 %{buildroot}%{_mandir}/man8/ +# Install rarp service and create rc compat symling +install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/rarpd.service +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcrarpd + %post %set_permissions %{_bindir}/ping %verifyscript %verify_permissions -e %{_bindir}/ping +%pre -n rarpd +%service_add_pre rarpd.service + +%post -n rarpd +%service_add_post rarpd.service + +%preun -n rarpd +%service_del_preun rarpd.service + +%postun -n rarpd +%service_del_postun rarpd.service + %files %doc RELNOTES %verify(not mode caps) %attr(0755,root,root) %{_bindir}/ping @@ -152,6 +171,8 @@ install -m 644 doc/*.8 %{buildroot}%{_mandir}/man8/ %files -n rarpd %{_sbindir}/rarpd +%{_sbindir}/rcrarpd +%{_unitdir}/rarpd.service #UsrMerge /sbin/rarpd #EndUsrMerge diff --git a/rarpd.service b/rarpd.service new file mode 100644 index 0000000..2479ff1 --- /dev/null +++ b/rarpd.service @@ -0,0 +1,14 @@ +[Unit] +Description=Reverse Address Resolution Protocol Requests Server +Requires=network.target +After=syslog.target network.target + +[Service] +Type=forking +EnvironmentFile=-/etc/sysconfig/rarpd +ExecStart=/usr/sbin/rarpd $OPTIONS $INTERFACE +StandardError=syslog + +[Install] +WantedBy=multi-user.target +