Bug 35396

Summary: /etc/rc.d/rc.sysinit complains on directories in /var/run/mon
Product: [Retired] Red Hat Linux Reporter: Jim Wright <jwright>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-09 23:26:12 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 Jim Wright 2001-04-09 23:26:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14jrw i686)


I just used up2date to bring my 7.0 system in line.  I don't know what was
there before, but now the directory /var/run/mon contains two
subdirectories.  In /etc/rc.d/rc.sysinit, it has code to clean everything
out of /var/run, along with special case code to deal with /var/run/news
and /var/run/sudo.  When booting, I get two lines of error message about rm
not being able to delete the directories /var/run/mon/log.d and
/var/run/mon/state.d.

The bug is that /etc/rc.d/rc.sysinit assumes that directories in /var/run
will not have any subdirectories.


Reproducible: Always
Steps to Reproduce:
1. reboot	

Actual Results:  error message during boot

Expected Results:  nice clean boot

% rpm -qf /etc/rc.d/rc.sysinit /var/run/mon/log.d
initscripts-5.49-1
mon-0.38.18-10

section of /etc/rc.d/rc.sysinit:

# Clean up /var
# I'd use find, but /usr may not be mounted.
for afile in /var/lock/* /var/run/*; do
   if [ -d "$afile" ]; then
      [ "`basename $afile`" != "news" -a "`basename $afile`" != "sudo" ] &&
rm -f $afile/*
   else
      rm -f $afile
   fi
done

Comment 1 Bill Nottingham 2001-04-10 01:46:08 UTC

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