LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cman_init_do_not_include_wrong_default_config_file.patch of Package cluster (Project home:sschapiro:openstack:upstream)

commit d65bbd39b052b56a1277ae1b3d7472b17140a9e5
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date:   Fri Jan 14 10:03:15 2011 +0100

    cman init: do not include wrong default file
    A recent change in glibc and shadow-utils (also in RHEL6) did add /etc/default
    (same as debian based distros) introducing a possible bug in detecting the
    correct default settings for the init script.
    The window is very small as we don´t document the usage of /etc/default/cman,
    but I don´t see a reason to take a chance. The fix is one liner to backport.
    Resolves: rhbz#669340
    Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index ea8293c..972a814 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -64,7 +64,7 @@ if [ -d /etc/sysconfig ]; then
 # deb based distros
-if [ -d /etc/default ]; then
+if [ ! -d /etc/sysconfig ]; then
 	[ -f /etc/default/cluster ] && . /etc/default/cluster
 	[ -f /etc/default/cman ] && . /etc/default/cman
 	[ -z "$LOCK_FILE" ] && LOCK_FILE="/var/lock/cman"