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