diff --git a/dlm.spec b/dlm.spec index cbdee8e..a730a40 100644 --- a/dlm.spec +++ b/dlm.spec @@ -1,6 +1,6 @@ Name: dlm Version: 3.99.0 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ # For a breakdown of the licensing, see README.license Group: System Environment/Kernel @@ -15,6 +15,7 @@ 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 +Patch3: fix_init_bits.patch Requires(post): systemd-units Requires(preun): systemd-units @@ -29,6 +30,7 @@ The kernel dlm requires a user daemon to control cluster membership. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build # upstream does not require configure @@ -102,6 +104,9 @@ developing applications that use %{name}. %{_libdir}/pkgconfig/*.pc %changelog +* Mon Feb 13 2012 Fabio M. Di Nitto - 3.99.0-6 +- Fix init/systemd service to use /etc/sysconfig/dlm + * Mon Feb 6 2012 Fabio M. Di Nitto - 3.99.0-5 - Fix systemd service to recognize /etc/sysconfig/dlm_controld diff --git a/fix_init_bits.patch b/fix_init_bits.patch new file mode 100644 index 0000000..ef5e475 --- /dev/null +++ b/fix_init_bits.patch @@ -0,0 +1,39 @@ +commit 0f19d2e7fb331ba3aedc69c6bd3eb5a75cf631c5 +Author: Fabio M. Di Nitto +Date: Mon Feb 13 06:15:32 2012 +0100 + + init/service scripts: make environment filename consistent with service name + + Generally speaking if a service is called foo, users expects to pass + options to the script via /etc/sysconfig/foo and not foo_something. + + This fix an oversight on my side in the previous round of init fixes. + + Signed-off-by: Fabio M. Di Nitto + +diff --git a/init/dlm.init b/init/dlm.init +index db8f17f..7f3da2d 100644 +--- a/init/dlm.init ++++ b/init/dlm.init +@@ -26,7 +26,7 @@ progdir="cluster" + lockfile="/var/run/$progdir/$prog.pid" + exec="/usr/sbin/$prog" + +-[ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog ++[ -f /etc/sysconfig/dlm ] && . /etc/sysconfig/dlm + + setup() { + modprobe dlm > /dev/null 2>&1 +diff --git a/init/dlm.service b/init/dlm.service +index 7be2ffd..d7cf9c7 100644 +--- a/init/dlm.service ++++ b/init/dlm.service +@@ -4,7 +4,7 @@ After=syslog.target network.target corosync.service + + [Service] + Type=forking +-EnvironmentFile=/etc/sysconfig/dlm_controld ++EnvironmentFile=/etc/sysconfig/dlm + ExecStartPre=/sbin/modprobe dlm + ExecStart=/usr/sbin/dlm_controld $DLM_CONTROLD_OPTS + #ExecStopPost=/sbin/modprobe -r dlm