glusterd.init use /run per Fedora File System Layout, or /var/run when

needed
This commit is contained in:
Kaleb KEITHLEY 2012-01-10 13:03:15 -05:00
parent 489a51e97b
commit 2cd9c4e4c8
2 changed files with 12 additions and 4 deletions

View File

@ -20,9 +20,13 @@
# Source function library. # Source function library.
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
exec="/usr/sbin/glusterd" exe="/usr/sbin/glusterd"
prog="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 # Set defaults, then source config for eventual overrides
GLUSTERD_NOFILE="65536" GLUSTERD_NOFILE="65536"
@ -31,10 +35,10 @@ GLUSTERD_NOFILE="65536"
lockfile=/var/lock/subsys/$prog lockfile=/var/lock/subsys/$prog
start() { start() {
[ -x $exec ] || exit 5 [ -x $exe ] || exit 5
ulimit -n $GLUSTERD_NOFILE ulimit -n $GLUSTERD_NOFILE
echo -n $"Starting $prog: " 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=$? retval=$?
echo echo
[ $retval -eq 0 ] && touch $lockfile [ $retval -eq 0 ] && touch $lockfile

View File

@ -25,7 +25,7 @@
Summary: Cluster File System Summary: Cluster File System
Name: glusterfs Name: glusterfs
Version: 3.2.5 Version: 3.2.5
Release: 5%{?dist} Release: 6%{?dist}
License: GPLv3 License: GPLv3
Group: System Environment/Base Group: System Environment/Base
Vendor: Red Hat Vendor: Red Hat
@ -391,6 +391,10 @@ if [ $1 -ge 1 ]; then
fi fi
%changelog %changelog
* Tue Jan 10 2012 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 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 <kkeithle@redhat.com> - 3.2.5-5 * Tue Jan 3 2012 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.5-5
- revised spec for init.d for fedora<=16, rhel<=6; native systemd for - revised spec for init.d for fedora<=16, rhel<=6; native systemd for
f17 and rhel7 f17 and rhel7