Bug 97575 - rc.sysinit errors on sub-subdirectories in /var/run
rc.sysinit errors on sub-subdirectories in /var/run
Status: CLOSED DUPLICATE of bug 113104
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2003-06-17 17:21 EDT by Chris Ricker
Modified: 2014-03-16 22:36 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-30 15:02:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chris Ricker 2003-06-17 17:21:08 EDT
Some third-party applications create sub-sub-directories in /var/run for
tracking state. For example, VMware makes /var/run/vmware/$user for every user
that runs it, then stores state for each user in those directories.

This causes errors when the system boots up and rc.sysinit is processed. I get

rm: cannot remove '/var/run/vmware/cricker': Is a directory

when the block:

for afile in /var/lock/* /var/run/* ; do
  if [ -d "$afile" ]; then
     case "`basename $afile`" in
    news|mon) ;;
        rm -f $afile/*/* ;;
    *)    rm -f $afile/* ;;
     rm -f $afile

in rc.sysinit runs

It looks to me like the

*) rm -f $afile/* ;;

stuff needs to make sure that it's a file, not a dir, that's being removed

(or else misguided third-party vendors need fixing, but that's a whole 'nother
matter ;-)
Comment 1 Tim Potter 2005-06-16 00:37:54 EDT
Subdirectories in /var/run are encouraged for programs that use more than
runtime file, at least according to the FHS: 


BTW, this bug is still present in RHEL4U1.
Comment 2 Bill Nottingham 2005-09-30 15:02:02 EDT

*** This bug has been marked as a duplicate of 113104 ***

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