[packages/openais] - systemd service file adder - Release: 2.2

draenog draenog at pld-linux.org
Thu Jul 5 02:41:17 CEST 2012


commit 7b0eaa41f47925683ca358740001377d8eb4eb58
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date:   Wed Jul 4 19:40:43 2012 +0000

    - systemd service file adder
    - Release: 2.2
    
    Changed files:
        openais.service -> 1.1
        openais.spec -> 1.24

 openais.service | 26 ++++++++++++++++++++++++++
 openais.spec    |  7 +++++--
 2 files changed, 31 insertions(+), 2 deletions(-)
---
diff --git a/openais.service b/openais.service
new file mode 100644
index 0000000..b71358c
--- /dev/null
+++ b/openais.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=OpenAIS Cluster Framework
+ConditionKernelCommandLine=!nocluster
+Requires=network.target
+After=network.target
+Before=corosync.service
+Conflicts=corosync.service
+Names=corosync-stack.service
+
+[Install]
+WantedBy=corosync.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/corosync.pid
+KillMode=process
+SysVStartPriority=21
+EnvironmentFile=-/etc/sysconfig/openais
+ExecStart=/usr/sbin/aisexec
+
+# Pacemaker can only exit after all managed services have shut down
+# A HA database could conceivably take even longer than this 
+TimeoutSec=30min
+
+# Restart options include: no, on-success, on-failure, on-abort or always
+Restart=on-failure
diff --git a/openais.spec b/openais.spec
index e3fecb4..21c4a78 100644
--- a/openais.spec
+++ b/openais.spec
@@ -7,12 +7,13 @@ Summary:	The openais Standards-Based Cluster Framework executive and APIs
 Summary(pl.UTF-8):	Ĺšrodowisko klastra opartego na standardach openais
 Name:		openais
 Version:	1.1.4
-Release:	2.1
+Release:	2.2
 License:	BSD
 Group:		Base
 Source0:	ftp://ftp:download@ftp.openais.org/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	e500ad3c49fdc45d8653f864e80ed82c
 Source1:	%{name}.init
+Source2:	%{name}.service
 URL:		http://www.openais.org/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -97,7 +98,7 @@ sed -i -e 's/OPT_CFLAGS=.*/OPT_CFLAGS=/' configure.ac
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -110,6 +111,7 @@ sed -i -e 's/^/#/' $RPM_BUILD_ROOT/etc/corosync/amf.conf
 %{__rm} -r $RPM_BUILD_ROOT/usr/share/doc/openais
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -147,6 +149,7 @@ fi
 %attr(755,root,root) %{_sbindir}/openais-instantiate
 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/amf.conf
 %attr(754,root,root) /etc/rc.d/init.d/openais
+%{systemdunitdir}/%{name}.service
 %attr(755,root,root) %{_libdir}/lcrso/openaisserviceenable.lcrso
 %attr(755,root,root) %{_libdir}/lcrso/service_*.lcrso
 %{_mandir}/man5/amf.conf.5*


More information about the test mailing list