Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 97575

Summary: rc.sysinit errors on sub-subdirectories in /var/run
Product: [Retired] Red Hat Linux Reporter: Chris Ricker <chris.ricker>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 9CC: p.van.egdom, rvokal, tpot
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-30 19:02:02 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:

Description Chris Ricker 2003-06-17 21:21:08 UTC
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) ;;
    sudo)
        rm -f $afile/*/* ;;
    *)    rm -f $afile/* ;;
     esac
  else
     rm -f $afile
  fi
done

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 04:37:54 UTC
Subdirectories in /var/run are encouraged for programs that use more than
runtime file, at least according to the FHS: 

http://www.pathname.com/fhs/2.2/fhs-5.13.html

BTW, this bug is still present in RHEL4U1.

Comment 2 Bill Nottingham 2005-09-30 19:02:02 UTC

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