|
Ian Kent |
cc58c1 |
autofs-5.0.6 - make autofs wait longer for shutdown
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
From: Ian Kent <ikent@redhat.com>
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
After signaling the automount daemon to shutdown the autofs init script
|
|
Ian Kent |
cc58c1 |
doesn't wait long enough for the daemon to exit. This can be a problem
|
|
Ian Kent |
cc58c1 |
if there are a large number of mounts or if servers are slow to respond.
|
|
Ian Kent |
cc58c1 |
---
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
CHANGELOG | 1 +
|
|
Ian Kent |
cc58c1 |
redhat/autofs.init.in | 5 ++++-
|
|
Ian Kent |
cc58c1 |
samples/autofs.service.in | 1 +
|
|
Ian Kent |
cc58c1 |
samples/rc.autofs.in | 5 ++++-
|
|
Ian Kent |
cc58c1 |
4 files changed, 10 insertions(+), 2 deletions(-)
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
--- autofs-5.0.6.orig/CHANGELOG
|
|
Ian Kent |
cc58c1 |
+++ autofs-5.0.6/CHANGELOG
|
|
Ian Kent |
cc58c1 |
@@ -50,6 +50,7 @@
|
|
Ian Kent |
cc58c1 |
- dont retry ldap connect if not required.
|
|
Ian Kent |
cc58c1 |
- check if /etc/mtab is a link to /proc/self/mounts.
|
|
Ian Kent |
cc58c1 |
- fix nfs4 contacts portmap.
|
|
Ian Kent |
cc58c1 |
+- make autofs wait longer for shutdown completion.
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
28/06/2011 autofs-5.0.6
|
|
Ian Kent |
cc58c1 |
-----------------------
|
|
Ian Kent |
cc58c1 |
--- autofs-5.0.6.orig/redhat/autofs.init.in
|
|
Ian Kent |
cc58c1 |
+++ autofs-5.0.6/redhat/autofs.init.in
|
|
Ian Kent |
cc58c1 |
@@ -108,7 +108,7 @@ function stop() {
|
|
Ian Kent |
cc58c1 |
while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
|
|
Ian Kent |
cc58c1 |
killproc $prog -TERM >& /dev/null
|
|
Ian Kent |
cc58c1 |
RETVAL=$?
|
|
Ian Kent |
cc58c1 |
- [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
|
|
Ian Kent |
cc58c1 |
+ [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 20
|
|
Ian Kent |
cc58c1 |
count=`expr $count + 1`
|
|
Ian Kent |
cc58c1 |
done
|
|
Ian Kent |
cc58c1 |
if [ $RETVAL -eq 0 ]; then
|
|
Ian Kent |
cc58c1 |
@@ -129,6 +129,9 @@ function restart() {
|
|
Ian Kent |
cc58c1 |
status autofs > /dev/null 2>&1
|
|
Ian Kent |
cc58c1 |
if [ $? -eq 0 ]; then
|
|
Ian Kent |
cc58c1 |
stop
|
|
Ian Kent |
cc58c1 |
+ while [ -n "`pidof $prog`" ] ; do
|
|
Ian Kent |
cc58c1 |
+ sleep 5
|
|
Ian Kent |
cc58c1 |
+ done
|
|
Ian Kent |
cc58c1 |
fi
|
|
Ian Kent |
cc58c1 |
start
|
|
Ian Kent |
cc58c1 |
}
|
|
Ian Kent |
cc58c1 |
--- autofs-5.0.6.orig/samples/autofs.service.in
|
|
Ian Kent |
cc58c1 |
+++ autofs-5.0.6/samples/autofs.service.in
|
|
Ian Kent |
cc58c1 |
@@ -8,6 +8,7 @@ PIDFile=@@autofspiddir@@/autofs.pid
|
|
Ian Kent |
cc58c1 |
EnvironmentFile=-@@autofsconfdir@@/autofs
|
|
Ian Kent |
cc58c1 |
ExecStart=@@sbindir@@/automount ${OPTIONS} --pid-file @@autofspiddir@@/autofs.pid
|
|
Ian Kent |
cc58c1 |
ExecReload=/usr/bin/kill -HUP $MAINPID
|
|
Ian Kent |
cc58c1 |
+TimeoutSec=180
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
[Install]
|
|
Ian Kent |
cc58c1 |
WantedBy=multi-user.target
|
|
Ian Kent |
cc58c1 |
--- autofs-5.0.6.orig/samples/rc.autofs.in
|
|
Ian Kent |
cc58c1 |
+++ autofs-5.0.6/samples/rc.autofs.in
|
|
Ian Kent |
cc58c1 |
@@ -91,7 +91,7 @@ function stop() {
|
|
Ian Kent |
cc58c1 |
while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
|
|
Ian Kent |
cc58c1 |
killall -TERM $prog >& /dev/null
|
|
Ian Kent |
cc58c1 |
RETVAL=$?
|
|
Ian Kent |
cc58c1 |
- [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
|
|
Ian Kent |
cc58c1 |
+ [ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 20
|
|
Ian Kent |
cc58c1 |
count=`expr $count + 1`
|
|
Ian Kent |
cc58c1 |
done
|
|
Ian Kent |
cc58c1 |
if [ -z "`pidof $prog`" ] ; then
|
|
Ian Kent |
cc58c1 |
@@ -104,6 +104,9 @@ function stop() {
|
|
Ian Kent |
cc58c1 |
|
|
Ian Kent |
cc58c1 |
function restart() {
|
|
Ian Kent |
cc58c1 |
stop
|
|
Ian Kent |
cc58c1 |
+ while [ -n "`pidof $prog`" ] ; do
|
|
Ian Kent |
cc58c1 |
+ sleep 5
|
|
Ian Kent |
cc58c1 |
+ done
|
|
Ian Kent |
cc58c1 |
start
|
|
Ian Kent |
cc58c1 |
}
|
|
Ian Kent |
cc58c1 |
|