From 28ba0732b2cf372b917950a0b404dffea24374fc Mon Sep 17 00:00:00 2001 From: "Fabio M. Di Nitto" Date: Fri, 3 Feb 2012 16:42:50 +0100 Subject: [PATCH] fix systemd start operation Signed-off-by: Fabio M. Di Nitto --- dlm.spec | 7 ++++++- fix_systemd_service.patch | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 fix_systemd_service.patch diff --git a/dlm.spec b/dlm.spec index 1c5f29b..09560f3 100644 --- a/dlm.spec +++ b/dlm.spec @@ -1,6 +1,6 @@ Name: dlm Version: 3.99.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ # For a breakdown of the licensing, see README.license Group: System Environment/Kernel @@ -13,6 +13,7 @@ BuildRequires: systemd-units 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 Requires(post): systemd-units Requires(preun): systemd-units @@ -25,6 +26,7 @@ The kernel dlm requires a user daemon to control cluster membership. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build # upstream does not require configure @@ -98,6 +100,9 @@ developing applications that use %{name}. %{_libdir}/pkgconfig/*.pc %changelog +* Fri Feb 3 2012 Fabio M. Di Nitto - 3.99.0-4 +- Fix systemd service to modprobe dlm + * Fri Feb 3 2012 Fabio M. Di Nitto - 3.99.0-3 - Add patch to fix udev rules and make sure dlm_controld can find its devices diff --git a/fix_systemd_service.patch b/fix_systemd_service.patch new file mode 100644 index 0000000..080899d --- /dev/null +++ b/fix_systemd_service.patch @@ -0,0 +1,24 @@ +commit 1ea3f422e7add8730e07029fc9f30aa38ddded2f +Author: Fabio M. Di Nitto +Date: Fri Feb 3 16:40:30 2012 +0100 + + systemd: modprobe dlm on start + + also add commented out modprobe removal on stop + + Signed-off-by: Fabio M. Di Nitto + +diff --git a/init/dlm.service b/init/dlm.service +index e275843..17579c2 100644 +--- a/init/dlm.service ++++ b/init/dlm.service +@@ -4,7 +4,9 @@ After=syslog.target network.target corosync.service + + [Service] + Type=forking ++ExecStartPre=/sbin/modprobe dlm + ExecStart=/usr/sbin/dlm_controld $OPTIONS ++#ExecStopPost=/sbin/modprobe -r dlm + + [Install] + WantedBy=multi-user.target