Bug 679998

Summary: [REG][5.6] rm command reports an error message during system booting.
Product: Red Hat Enterprise Linux 5 Reporter: Shinji Kito <skito>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 5.6CC: azelinka, ltroan, mhlavink, notting, plautrba, tumeya
Target Milestone: betaKeywords: OtherQA, Regression
Target Release: 5.8   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-8.45.39-1.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 03:04:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 668957, 697498, 758797    
Attachments:
Description Flags
Potential patch none

Description Shinji Kito 2011-02-24 03:29:42 UTC
Description of problem:
rm command in rc.sysinit failed since "-r" option is missing.

Error Message:
"rm: cannot remove directory `/var/run/dovecot/login/': Is a directory"

initscripts-8.45.33/rc.d/rc.sysinit:
849                 */dovecot)      rm -f $afile/* $afile/*/* ;;


This seems a regression due to BZ#492994 fix.
 

Version-Release number of selected component (if applicable):
RHEL5.6, initscripts-8.45.33-1.el5 


How reproducible:
Always


Steps to Reproduce:
1. Install dovecot, and start dovecot service
2. Redirect the error message to a file.
   e.g.
   Edit /etc/rc.sysinit:

   */dovecot)      rm -f $afile/* $afile/*/* > /tmp/log 2>&1 ;;

3. Reboot the system
4. Check /tmp/log for the error message
  

Actual results:
Cannot remove directories

Expected results:
Can remove directories

Additional info:

A patch file is also attached.

Comment 1 Shinji Kito 2011-02-24 03:30:45 UTC
Created attachment 480632 [details]
rc.sysinit_rm.patch

Comment 2 Bill Nottingham 2011-02-24 15:17:00 UTC
CC'ing dovecot maintainer.

Comment 3 Michal Hlavinka 2011-02-24 16:15:09 UTC
Correct, dovecot creates/uses directory under /var/run/dovecot.

a)you can remove it and dovecot will recreate it on start (dovecot_t is not allowed to create directory under dovecot_var_run_t yet, so selinux change is required too)

b)ignore error and clear only content in /var/run/dovecot/ (contains master.pid) and not subdirectory

Comment 5 RHEL Program Management 2011-08-25 18:29:42 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 21 Bill Nottingham 2011-10-17 17:59:32 UTC
Created attachment 528613 [details]
Potential patch

This patch would just drop the error messages, which seems the simplest fix.

Comment 27 errata-xmlrpc 2012-02-21 03:04:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0312.html