dlm/fix_init_bits.patch
Fabio M. Di Nitto a3710f70c5 fix init and systemd service properly
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-02-13 06:19:35 +01:00

40 lines
1.3 KiB
Diff

commit 0f19d2e7fb331ba3aedc69c6bd3eb5a75cf631c5
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
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 <fdinitto@redhat.com>
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