Bug 97575 - rc.sysinit errors on sub-subdirectories in /var/run
Summary: rc.sysinit errors on sub-subdirectories in /var/run
Keywords:
Status: CLOSED DUPLICATE of bug 113104
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 9
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-17 21:21 UTC by Chris Ricker
Modified: 2014-03-17 02:36 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-09-30 19:02:02 UTC
Embargoed:


Attachments (Terms of Use)

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 ***


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