diff --git a/glusterd.init b/glusterd.init index d09847a..0007d2e 100644 --- a/glusterd.init +++ b/glusterd.init @@ -20,9 +20,13 @@ # Source function library. . /etc/rc.d/init.d/functions -exec="/usr/sbin/glusterd" +exe="/usr/sbin/glusterd" prog="glusterd" +# Fedora File System Layout dictates /run +[ -e /run ] && RUNDIR="/run" +pidf="${RUNDIR:-/var/run}/$prog.pid" + # Set defaults, then source config for eventual overrides GLUSTERD_NOFILE="65536" @@ -31,10 +35,10 @@ GLUSTERD_NOFILE="65536" lockfile=/var/lock/subsys/$prog start() { - [ -x $exec ] || exit 5 + [ -x $exe ] || exit 5 ulimit -n $GLUSTERD_NOFILE echo -n $"Starting $prog: " - daemon $exec${GLUSTERD_LOGFILE+" -l $GLUSTERD_LOGFILE"}${GLUSTERD_LOGLEVEL+" -L $GLUSTERD_LOGLEVEL"} -p /var/run/glusterd.pid + daemon $exe${GLUSTERD_LOGFILE+" -l $GLUSTERD_LOGFILE"}${GLUSTERD_LOGLEVEL+" -L $GLUSTERD_LOGLEVEL"} -p $pidf retval=$? echo [ $retval -eq 0 ] && touch $lockfile diff --git a/glusterfs.spec b/glusterfs.spec index 76de754..88058b4 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -25,7 +25,7 @@ Summary: Cluster File System Name: glusterfs Version: 3.2.5 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3 Group: System Environment/Base Vendor: Red Hat @@ -391,6 +391,10 @@ if [ $1 -ge 1 ]; then fi %changelog +* Tue Jan 10 2012 Kaleb S. KEITHLEY - 3.2.5-6 +- glusterd.init use /run per Fedora File System Layout, or /var/run when + needed + * Tue Jan 3 2012 Kaleb S. KEITHLEY - 3.2.5-5 - revised spec for init.d for fedora<=16, rhel<=6; native systemd for f17 and rhel7