Bug 624444 - 'Restart' option does not work for autofs initd script
'Restart' option does not work for autofs initd script
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: autofs (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Ian Kent
yanfu,wang
:
: 643974 662911 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-16 09:45 EDT by Joseph Mann
Modified: 2011-05-19 10:22 EDT (History)
7 users (show)

See Also:
Fixed In Version: autofs-5.0.5-25.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 10:22:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0753 normal SHIPPED_LIVE autofs bug fix update 2011-05-18 14:08:57 EDT

  None (edit)
Description Joseph Mann 2010-08-16 09:45:39 EDT
Description of problem:
Running "service autofs restart" outputs the following:
# service autofs restart
Starting automount: automount: program is already running.
                                                           [  OK  ]

The autofs daemon is not restarted


Version-Release number of selected component (if applicable):
2.6.32-59.el6.x86_64

How reproducible:
Execute 

Additional info:
This is because the autofs script is not properly calling the status command. This patch would fix the issue


--- /etc/rc.d/init.d/autofs
+++ /etc/rc.d/init.d/autofs
@@ -126,7 +126,7 @@ function stop() {
 }
 
 function restart() {
-	status > /dev/null 2>&1
+	status autofs > /dev/null 2>&1
 	if [ $? -eq 0 ]; then
 		stop
 	fi
Comment 2 RHEL Product and Program Management 2010-08-16 10:18:30 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 3 RHEL Product and Program Management 2010-08-18 17:28:29 EDT
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.
Comment 4 Ian Kent 2010-10-18 20:01:30 EDT
*** Bug 643974 has been marked as a duplicate of this bug. ***
Comment 5 Ian Kent 2010-12-14 21:14:49 EST
*** Bug 662911 has been marked as a duplicate of this bug. ***
Comment 7 yanfu,wang 2011-02-22 02:59:20 EST
reproduced on old package:
# service autofs restart
Starting automount: automount: program is already running.
                                                           [  OK  ]

verified on new package on i386 and x86_64:
# service autofs restart
Stopping automount: [  OK  ]
Starting automount: [  OK  ]
# uname -a
Linux hp-p6100z-02.lab.bos.redhat.com 2.6.32-71.el6.i686 #1 SMP Wed Sep 1 01:26:34 EDT 2010 i686 i686 i386 GNU/Linux
# rpm -qa|grep autofs
autofs-5.0.5-29.el6.i686
Comment 8 Joseph Kachuck 2011-02-22 13:55:47 EST
=== In Red Hat Customer Portal Case 00404866 ===
--- Comment by IBM bug, proxy on 2/22/2011 8:11 AM ---

------- Comment From sachinp@in.ibm.com 2011-02-22 08:03 EDT-------
This problem has been fixed with RHEL 6.1 early build

# service autofs status
automount (pid  1291) is running...

# service autofs restart
Stopping automount: [  OK  ]
Starting automount: [  OK  ]

# rpm -qa | grep autofs
autofs-5.0.5-29.el6.s390x

The corresponding code has been changed.

# cat /etc/init.d/autofs
.......
function restart() {
status autofs > /dev/null 2>&1
if [ $? -eq 0 ]; then
stop
fi
start
}
......

# uname -r
2.6.32-114.0.1.el6.s390x
# # cat /etc/issue
Red Hat Enterprise Linux Server release 6.1 Beta (Santiago)
Kernel \r on an \m

So the bug can be closed.
Comment 9 errata-xmlrpc 2011-05-19 10:22:23 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0753.html

Note You need to log in before you can comment on or make changes to this bug.