- fix pidof init script usage.
This commit is contained in:
parent
52ae86eada
commit
1ad868f6d2
91
autofs-5.0.5-fix-pidof-init-script-usage.patch
Normal file
91
autofs-5.0.5-fix-pidof-init-script-usage.patch
Normal file
@ -0,0 +1,91 @@
|
||||
autofs-5.0.5 - fix pidof init script usage
|
||||
|
||||
From: Ian Kent <raven@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.
|
||||
---
|
||||
|
||||
CHANGELOG | 1 +
|
||||
redhat/autofs.init.in | 8 ++++----
|
||||
samples/rc.autofs.in | 8 ++++----
|
||||
3 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
|
||||
diff --git a/CHANGELOG b/CHANGELOG
|
||||
index dd093e2..cc2efab 100644
|
||||
--- a/CHANGELOG
|
||||
+++ b/CHANGELOG
|
||||
@@ -12,6 +12,7 @@
|
||||
- don't use master_lex_destroy() to clear parse buffer.
|
||||
- make documentation for set-log-priority clearer.
|
||||
- fix timeout in connect_nb().
|
||||
+- fix pidof init script usage.
|
||||
|
||||
03/09/2009 autofs-5.0.5
|
||||
-----------------------
|
||||
diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in
|
||||
index 806302b..363e824 100644
|
||||
--- a/redhat/autofs.init.in
|
||||
+++ b/redhat/autofs.init.in
|
||||
@@ -101,14 +101,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"
|
||||
@@ -128,7 +128,7 @@ function reload() {
|
||||
RETVAL=1
|
||||
return $RETVAL
|
||||
fi
|
||||
- pid=`pidof $DAEMON`
|
||||
+ pid=`pidof $prog`
|
||||
if [ -z $pid ]; then
|
||||
echo $"$prog not running"
|
||||
RETVAL=1
|
||||
diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in
|
||||
index b193a4e..ae2e907 100644
|
||||
--- a/samples/rc.autofs.in
|
||||
+++ b/samples/rc.autofs.in
|
||||
@@ -88,13 +88,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 [ -z "`pidof $DAEMON`" ] ; then
|
||||
+ if [ -z "`pidof $prog`" ] ; then
|
||||
echo "done."
|
||||
else
|
||||
echo "failed."
|
||||
@@ -108,7 +108,7 @@ function restart() {
|
||||
}
|
||||
|
||||
function reload() {
|
||||
- pid=`pidof $DAEMON`
|
||||
+ pid=`pidof $prog`
|
||||
if [ -z $pid ]; then
|
||||
echo $"$prog not running"
|
||||
RETVAL=1
|
@ -4,7 +4,7 @@
|
||||
Summary: A tool for automatically mounting and unmounting filesystems
|
||||
Name: autofs
|
||||
Version: 5.0.5
|
||||
Release: 8%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
@ -22,6 +22,7 @@ Patch9: autofs-5.0.5-fix-ext4-fsck-at-mount.patch
|
||||
Patch10: autofs-5.0.5-dont-use-master_lex_destroy-to-clear-parse-buffer.patch
|
||||
Patch11: autofs-5.0.5-make-documentation-for-set-log-priority-clearer.patch
|
||||
Patch12: autofs-5.0.5-fix-timeout-in-connect_nb.patch
|
||||
Patch13: 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 libtirpc-devel
|
||||
Requires: kernel >= 2.6.17
|
||||
@ -75,6 +76,7 @@ echo %{version}-%{release} > .version
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
%build
|
||||
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
||||
@ -127,6 +129,9 @@ fi
|
||||
%{_libdir}/autofs/
|
||||
|
||||
%changelog
|
||||
* Tue Nov 24 2009 Ian Kent <ikent@redhat.com> - 1:5.0.5-10
|
||||
- fix pidof init script usage.
|
||||
|
||||
* Mon Nov 23 2009 Ian Kent <ikent@redhat.com> - 1:5.0.5-8
|
||||
- fix timeout in connect_nb().
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user