[ipxripd] migration to systemd
Dmitry Butskoy
buc at fedoraproject.org
Fri Jul 15 14:23:56 UTC 2011
commit 9d614f303442b4019bf3a8115e3d57f456fdfc2f
Author: Dmitry Butskoy <Dmitry at Butskoy.name>
Date: Fri Jul 15 18:23:17 2011 +0400
migration to systemd
ipxripd.service | 10 ++++++++++
ipxripd.spec | 36 ++++++++++++++++++++++++------------
2 files changed, 34 insertions(+), 12 deletions(-)
---
diff --git a/ipxripd.service b/ipxripd.service
new file mode 100644
index 0000000..8652dc0
--- /dev/null
+++ b/ipxripd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=IPX RIP and SAP daemon
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/ipxd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ipxripd.spec b/ipxripd.spec
index b800330..f4e4407 100644
--- a/ipxripd.spec
+++ b/ipxripd.spec
@@ -1,20 +1,22 @@
Summary: IPX RIP/SAP daemon - routing for IPX networks
Name: ipxripd
Version: 0.8
-Release: 8%{?dist}
+Release: 9%{?dist}
Group: System Environment/Daemons
License: GPLv2+
URL: ftp://ftp.ibiblio.org/pub/Linux/system/filesystems/ncpfs/
Source0: ftp://ftp.ibiblio.org/pub/Linux/system/filesystems/ncpfs/ipxripd-%{version}.tar.gz
Source1: ipxripd.init
+Source2: ipxripd.service
Patch0: ipxripd-0.8-glibc2.1.patch
Patch1: ipxripd-0.7-gcc3.patch
Patch2: ipxripd-0.7-kernel2.6.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: systemd-units
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig, /sbin/service
-Requires(postun): /sbin/service
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
%description
@@ -45,28 +47,34 @@ install -d $RPM_BUILD_ROOT%{_mandir}/man5
install -p ipxd.8 $RPM_BUILD_ROOT%{_mandir}/man8
install -p ipx_ticks.5 $RPM_BUILD_ROOT%{_mandir}/man5
-install -d $RPM_BUILD_ROOT%{_initrddir}
-install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/ipxd
+#install -d $RPM_BUILD_ROOT%{_initrddir}
+#install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/ipxd
+install -d $RPM_BUILD_ROOT%{_unitdir}
+install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/ipxd.service
-%post
-/sbin/chkconfig --add ipxd
+%post
+if [ $1 = 1 ]; then
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
%preun
if [ $1 = 0 ]; then
- /sbin/service ipxd stop >/dev/null 2>&1
- /sbin/chkconfig --del ipxd
+ /bin/systemctl --no-reload disable ipxd.service >/dev/null 2>&1 || :
+ /bin/systemctl stop ipxd.service >/dev/null 2>&1 || :
fi
%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 != 0 ]; then
- /sbin/service ipxd condrestart >/dev/null 2>&1
+ /bin/systemctl try-restart ipxd.service >/dev/null 2>&1 || :
fi
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -75,11 +83,15 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%doc COPYING README ipx_ticks ipxripd-*.lsm
%{_sbindir}/*
-%{_initrddir}/*
+#%{_initrddir}/*
+%{_unitdir}/*
%{_mandir}/*/*
%changelog
+* Fri Jul 15 2011 Dmitry Butskoy <Dmitry at Butskoy.name> - 0.8-9
+- Migration from SysV to Systemd init system (#662724)
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list