1
autofs-5.0.5 - fix pidof init script usage
3
From: Ian Kent <raven@themaw.net>
5
For some reason, following an update, pidof doesn't return the pid
6
of a running automount daemon when the path is used rather than just
7
the name, probably to do with the inode of the daemon program changing.
9
So we change the init script to use just the program name rather than
14
redhat/autofs.init.in | 8 ++++----
15
samples/rc.autofs.in | 8 ++++----
16
3 files changed, 9 insertions(+), 8 deletions(-)
19
diff --git a/CHANGELOG b/CHANGELOG
20
index dd093e2..cc2efab 100644
24
- don't use master_lex_destroy() to clear parse buffer.
25
- make documentation for set-log-priority clearer.
26
- fix timeout in connect_nb().
27
+- fix pidof init script usage.
29
03/09/2009 autofs-5.0.5
30
-----------------------
31
diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in
32
index 806302b..363e824 100644
33
--- a/redhat/autofs.init.in
34
+++ b/redhat/autofs.init.in
35
@@ -101,14 +101,14 @@ function start() {
37
echo -n $"Stopping $prog: "
39
- while [ -n "`pidof $DAEMON`" -a $count -lt 15 ] ; do
40
+ while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
41
killproc $prog -TERM >& /dev/null
43
- [ $RETVAL = 0 -a -z "`pidof $DAEMON`" ] || sleep 3
44
+ [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
45
count=`expr $count + 1`
47
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/autofs
48
- if [ -n "`pidof $DAEMON`" ] ; then
49
+ if [ -n "`pidof $prog`" ] ; then
50
failure "$prog shutdown"
52
success "$prog shutdown"
53
@@ -128,7 +128,7 @@ function reload() {
60
echo $"$prog not running"
62
diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in
63
index b193a4e..ae2e907 100644
64
--- a/samples/rc.autofs.in
65
+++ b/samples/rc.autofs.in
66
@@ -88,13 +88,13 @@ function start() {
68
echo -n $"Stopping $prog: "
70
- while [ -n "`pidof $DAEMON`" -a $count -lt 15 ] ; do
71
+ while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
72
killall -TERM $prog >& /dev/null
74
- [ $RETVAL = 0 -a -z "`pidof $DAEMON`" ] || sleep 3
75
+ [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
76
count=`expr $count + 1`
78
- if [ -z "`pidof $DAEMON`" ] ; then
79
+ if [ -z "`pidof $prog`" ] ; then
83
@@ -108,7 +108,7 @@ function restart() {
90
echo $"$prog not running"