Add fixes for /var/run running on tmpfs, fixes bugzilla 656621
This commit is contained in:
parent
dacc6d4d19
commit
f95f6cb173
@ -3,7 +3,7 @@
|
||||
|
||||
Name: memcached
|
||||
Version: 1.4.5
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 0
|
||||
Summary: High Performance, Distributed Memory Object Cache
|
||||
|
||||
@ -135,7 +135,7 @@ exit 0
|
||||
%doc AUTHORS ChangeLog COPYING NEWS README doc/CONTRIBUTORS doc/*.txt
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||
|
||||
%dir %attr(755,%{username},%{groupname}) %{_localstatedir}/run/memcached
|
||||
%ghost %dir %attr(755,%{username},%{groupname}) %{_localstatedir}/run/memcached
|
||||
%{_bindir}/memcached-tool
|
||||
%{_bindir}/memcached
|
||||
%{_mandir}/man1/memcached.1*
|
||||
@ -147,6 +147,9 @@ exit 0
|
||||
%{_includedir}/memcached/*
|
||||
|
||||
%changelog
|
||||
* Sun Nov 28 2010 Paul Lindner <lindner@mirth.inuus.com> - 0:1.4.5-4
|
||||
- Add code to deal with /var/run/memcached on tmpfs
|
||||
|
||||
* Wed Sep 8 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-3
|
||||
- Apply patch from memcached issue #60, solves Bugzilla 631051
|
||||
|
||||
|
@ -37,9 +37,13 @@ lockfile=${LOCKFILE-/var/lock/subsys/memcached}
|
||||
|
||||
start () {
|
||||
echo -n $"Starting $prog: "
|
||||
# Ensure that /var/run/memcached has proper permissions
|
||||
if [ "`stat -c %U /var/run/memcached`" != "$USER" ]; then
|
||||
chown $USER /var/run/memcached
|
||||
# Ensure that $pidfile directory has proper permissions and exists
|
||||
piddir=`dirname $pidfile`
|
||||
if [ ! -d $piddir ]; then
|
||||
mkdir $piddir
|
||||
fi
|
||||
if [ "`stat -c %U $piddir`" != "$USER" ]; then
|
||||
chown $USER $piddir
|
||||
fi
|
||||
|
||||
daemon --pidfile ${pidfile} memcached -d -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -P ${pidfile} $OPTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user