Bug 679998 - [REG][5.6] rm command reports an error message during system booting.
Summary: [REG][5.6] rm command reports an error message during system booting.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: beta
: 5.8
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 668957 697498 758797
TreeView+ depends on / blocked
 
Reported: 2011-02-24 03:29 UTC by Shinji Kito
Modified: 2018-11-26 19:21 UTC (History)
6 users (show)

Fixed In Version: initscripts-8.45.39-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 03:04:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Potential patch (467 bytes, patch)
2011-10-17 17:59 UTC, Bill Nottingham
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0312 0 normal SHIPPED_LIVE Low: initscripts security and bug fix update 2012-02-21 07:25:10 UTC

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


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