Bug 624444 - 'Restart' option does not work for autofs initd script
Summary: 'Restart' option does not work for autofs initd script
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: autofs
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: yanfu,wang
URL:
Whiteboard:
Keywords:
: 643974 662911 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-16 13:45 UTC by Joseph Mann
Modified: 2018-11-14 15:15 UTC (History)
7 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-05-19 14:22:23 UTC


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 18:08:57 UTC

Description Joseph Mann 2010-08-16 13:45:39 UTC
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 14:18:30 UTC
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 21:28:29 UTC
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-19 00:01:30 UTC
*** Bug 643974 has been marked as a duplicate of this bug. ***

Comment 5 Ian Kent 2010-12-15 02:14:49 UTC
*** Bug 662911 has been marked as a duplicate of this bug. ***

Comment 7 yanfu,wang 2011-02-22 07:59:20 UTC
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 18:55:47 UTC
=== 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 14:22:23 UTC
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.