more systemd bits

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
This commit is contained in:
Fabio M. Di Nitto 2012-02-06 13:32:46 +01:00
parent 28ba0732b2
commit c2aae11531
2 changed files with 32 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: dlm
Version: 3.99.0
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+
# For a breakdown of the licensing, see README.license
Group: System Environment/Kernel
@ -14,6 +14,7 @@ Requires: %{name}-lib = %{version}-%{release}
Source0: http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
Patch0: fix_udev_rules.patch
Patch1: fix_systemd_service.patch
Patch2: fix_systemd_service_part2.patch
Requires(post): systemd-units
Requires(preun): systemd-units
@ -27,6 +28,7 @@ The kernel dlm requires a user daemon to control cluster membership.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
# upstream does not require configure
@ -100,6 +102,9 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/*.pc
%changelog
* Mon Feb 6 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.99.0-5
- Fix systemd service to recognize /etc/sysconfig/dlm_controld
* Fri Feb 3 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.99.0-4
- Fix systemd service to modprobe dlm

View File

@ -0,0 +1,26 @@
commit 3a7c2f696f00b2edfcbc4a5b7cd2cd7128f61f0a
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date: Mon Feb 6 13:26:47 2012 +0100
systemd: align with init script functionalities
Enable use of /etc/sysconfig/dlm_controld and use DLM_CONTROLD_OPTS
for both systemd and init script
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
diff --git a/init/dlm.service b/init/dlm.service
index 17579c2..7be2ffd 100644
--- a/init/dlm.service
+++ b/init/dlm.service
@@ -4,8 +4,9 @@ After=syslog.target network.target corosync.service
[Service]
Type=forking
+EnvironmentFile=/etc/sysconfig/dlm_controld
ExecStartPre=/sbin/modprobe dlm
-ExecStart=/usr/sbin/dlm_controld $OPTIONS
+ExecStart=/usr/sbin/dlm_controld $DLM_CONTROLD_OPTS
#ExecStopPost=/sbin/modprobe -r dlm
[Install]