[glusterfs/el6] revised sysconfig and init.d scripts N.B. glusterfsd.{init, sysconfig, service} should go away. Gluste

Kaleb S. KEITHLEY kkeithle at fedoraproject.org
Wed Dec 7 18:35:40 UTC 2011


commit a61c3d379566ae8e654a49b138383d2900900e9f
Author: Kaleb KEITHLEY <kkeithle at f16node1.kkeithle.usersys.redhat.com>
Date:   Wed Dec 7 13:34:09 2011 -0500

    revised sysconfig and init.d scripts
    N.B. glusterfsd.{init,sysconfig,service} should go away. Glusterd is
    responsible for starting and stopping the glusterfsd(s)

 glusterd.init        |    7 +++----
 glusterd.sysconfig   |    6 ++----
 glusterfs.spec       |    6 +++++-
 glusterfsd.init      |    2 +-
 glusterfsd.sysconfig |    1 -
 5 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/glusterd.init b/glusterd.init
index 5e7f67f..d09847a 100644
--- a/glusterd.init
+++ b/glusterd.init
@@ -24,7 +24,7 @@ exec="/usr/sbin/glusterd"
 prog="glusterd"
 
 # Set defaults, then source config for eventual overrides
-GLUSTERFSD_NOFILE="65536"
+GLUSTERD_NOFILE="65536"
 
 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
@@ -32,10 +32,9 @@ lockfile=/var/lock/subsys/$prog
 
 start() {
     [ -x $exec ] || exit 5
-    [ -f $GLUSTERFSD_CONFIG ] || exit 6
-    ulimit -n $GLUSTERFSD_NOFILE
+    ulimit -n $GLUSTERD_NOFILE
     echo -n $"Starting $prog: "
-    daemon $exec${GLUSTERFSD_CONFIG+" -f $GLUSTERFSD_CONFIG"}${GLUSTERFSD_LOGFILE+" -l $GLUSTERFSD_LOGFILE"}${GLUSTERFSD_LOGLEVEL+" -L $GLUSTERFSD_LOGLEVEL"} -p /var/run/glusterd.pid
+    daemon $exec${GLUSTERD_LOGFILE+" -l $GLUSTERD_LOGFILE"}${GLUSTERD_LOGLEVEL+" -L $GLUSTERD_LOGLEVEL"} -p /var/run/glusterd.pid
     retval=$?
     echo
     [ $retval -eq 0 ] && touch $lockfile
diff --git a/glusterd.sysconfig b/glusterd.sysconfig
index 09dba20..3a9cb86 100644
--- a/glusterd.sysconfig
+++ b/glusterd.sysconfig
@@ -1,8 +1,6 @@
 # Change the glusterd service defaults here.
 # See "glusterd --help" outpout for defaults and possible values.
 
-#GLUSTERFSD_CONFIG="/etc/gluster/glusterd.vol"
-#GLUSTERFSD_LOGFILE="/var/log/gluster/gluster.log"
-#GLUSTERFSD_LOGLEVEL="NORMAL"
-#GLUSTERFSD_NOFILE="65536"
+#GLUSTERD_LOGFILE="/var/log/gluster/gluster.log"
+#GLUSTERD_LOGLEVEL="NORMAL"
 
diff --git a/glusterfs.spec b/glusterfs.spec
index 4128945..d1ec7f0 100644
--- a/glusterfs.spec
+++ b/glusterfs.spec
@@ -25,7 +25,7 @@
 Summary:          Cluster File System
 Name:             glusterfs
 Version:          3.2.5
-Release:          3%{?dist}
+Release:          4%{?dist}
 License:          GPLv3
 Group:            System Environment/Base
 Vendor:           Red Hat
@@ -391,6 +391,10 @@ if [ $1 -ge 1 ]; then
 fi
 
 %changelog
+* Wed Dec 7 2011 Kaleb S. KEITHLEY <kkeithle at redhat.com> - 3.2.5-4
+- revised sysconfig and init.d scripts. (glusterfsd.{init,sysconfig,service}
+  should go away, as glusterd is responsible for starting and stopping it.)
+
 * Wed Nov 23 2011 Kaleb S. KEITHLEY <kkeithle at redhat.com> - 3.2.5-3
 - revised libglusterfs/src/Makefile.* to (re)enable parallel make
 
diff --git a/glusterfsd.init b/glusterfsd.init
index e36a98d..951c18d 100644
--- a/glusterfsd.init
+++ b/glusterfsd.init
@@ -32,7 +32,7 @@ lockfile=/var/lock/subsys/$prog
 
 start() {
     [ -x $exec ] || exit 5
-    [ -f $GLUSTERFSD_CONFIG ] || exit 6
+    [ $GLUSTERFSD_CONFIG -o -f $GLUSTERFSD_CONFIG ] || exit 6
     ulimit -n $GLUSTERFSD_NOFILE
     echo -n $"Starting $prog: "
     daemon $exec${GLUSTERFSD_CONFIG+" -f $GLUSTERFSD_CONFIG"}${GLUSTERFSD_LOGFILE+" -l $GLUSTERFSD_LOGFILE"}${GLUSTERFSD_LOGLEVEL+" -L $GLUSTERFSD_LOGLEVEL"} -p /var/run/glusterfsd.pid
diff --git a/glusterfsd.sysconfig b/glusterfsd.sysconfig
index f46cd7d..250983a 100644
--- a/glusterfsd.sysconfig
+++ b/glusterfsd.sysconfig
@@ -4,5 +4,4 @@
 #GLUSTERFSD_CONFIG="/etc/glusterfs/glusterfsd.vol"
 #GLUSTERFSD_LOGFILE="/var/log/glusterfs/glusterfs.log"
 #GLUSTERFSD_LOGLEVEL="NORMAL"
-#GLUSTERFSD_NOFILE="65536"
 


More information about the scm-commits mailing list