rpms/autofs/F-10 autofs-5.0.5-fix-pidof-init-script-usage.patch, NONE, 1.1 autofs.spec, 1.263, 1.264
Ian Kent
iankent at fedoraproject.org
Wed Nov 25 02:02:44 UTC 2009
Author: iankent
Update of /cvs/pkgs/rpms/autofs/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5120
Modified Files:
autofs.spec
Added Files:
autofs-5.0.5-fix-pidof-init-script-usage.patch
Log Message:
* Wed Nov 25 2009 Ian Kent <ikent at redhat.com> - 1:5.0.3-45
- fix pidof init script usage.
autofs-5.0.5-fix-pidof-init-script-usage.patch:
redhat/autofs.init.in | 8 ++++----
samples/rc.autofs.in | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
--- NEW FILE autofs-5.0.5-fix-pidof-init-script-usage.patch ---
autofs-5.0.5 - fix pidof init script usage
From: Ian Kent <raven at themaw.net>
For some reason, following an update, pidof doesn't return the pid
of a running automount daemon when the path is used rather than just
the name, probably to do with the inode of the daemon program changing.
So we change the init script to use just the program name rather than
the path.
---
redhat/autofs.init.in | 8 ++++----
samples/rc.autofs.in | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
--- autofs-5.0.3.orig/redhat/autofs.init.in
+++ autofs-5.0.3/redhat/autofs.init.in
@@ -81,14 +81,14 @@ function start() {
function stop() {
echo -n $"Stopping $prog: "
count=0
- while [ -n "`pidof $DAEMON`" -a $count -lt 15 ] ; do
+ while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
killproc $prog -TERM >& /dev/null
RETVAL=$?
- [ $RETVAL = 0 -a -z "`pidof $DAEMON`" ] || sleep 3
+ [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
count=`expr $count + 1`
done
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/autofs
- if [ -n "`pidof $DAEMON`" ] ; then
+ if [ -n "`pidof $prog`" ] ; then
failure "$prog shutdown"
else
success "$prog shutdown"
@@ -108,7 +108,7 @@ function reload() {
RETVAL=1
return $RETVAL
fi
- pid=`pidof $DAEMON`
+ pid=`pidof $prog`
if [ -z $pid ]; then
echo $"$prog not running"
RETVAL=1
--- autofs-5.0.3.orig/samples/rc.autofs.in
+++ autofs-5.0.3/samples/rc.autofs.in
@@ -69,13 +69,13 @@ function start() {
function stop() {
echo -n $"Stopping $prog: "
count=0
- while [ -n "`pidof $DAEMON`" -a $count -lt 15 ] ; do
+ while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
killall -TERM $prog >& /dev/null
RETVAL=$?
- [ $RETVAL = 0 -a -z "`pidof $DAEMON`" ] || sleep 3
+ [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
count=`expr $count + 1`
done
- if [ -n "`pidof $DAEMON`" ] ; then
+ if [ -n "`pidof $prog`" ] ; then
echo "done."
else
echo "failed."
@@ -89,7 +89,7 @@ function restart() {
}
function reload() {
- pid=`pidof $DAEMON`
+ pid=`pidof $prog`
if [ -z $pid ]; then
echo $"$prog not running"
RETVAL=1
Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/F-10/autofs.spec,v
retrieving revision 1.263
retrieving revision 1.264
diff -u -p -r1.263 -r1.264
--- autofs.spec 6 Nov 2009 05:20:08 -0000 1.263
+++ autofs.spec 25 Nov 2009 02:02:43 -0000 1.264
@@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.3
-Release: 44
+Release: 45
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@@ -77,6 +77,7 @@ Patch64: autofs-5.0.3-renew-sasl-creds-u
Patch65: autofs-5.0.3-fix-memory-leak-reading-ldap-master.patch
Patch66: autofs-5.0.4-add-lsb-init-script-parameter-block.patch
Patch67: autofs-5.0.3-hsterror.patch
+Patch68: autofs-5.0.5-fix-pidof-init-script-usage.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs
Requires: kernel >= 2.6.17
@@ -185,6 +186,7 @@ echo %{version}-%{release} > .version
%patch65 -p1
%patch66 -p1
%patch67 -p1
+%patch68 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -237,6 +239,9 @@ fi
%{_libdir}/autofs/
%changelog
+* Wed Nov 25 2009 Ian Kent <ikent at redhat.com> - 1:5.0.3-45
+- fix pidof init script usage.
+
* Fri Nov 6 2009 Ian Kent <ikent at redhat.com> - 5.0.4-44
- fix incorrect host name lookup error message (bz483756).
More information about the fedora-extras-commits
mailing list