Bug 8914

Summary: rc.sysinit complains on ] error
Product: [Retired] Red Hat Linux Reporter: Daniel Stenberg <daniel.stenberg>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.1CC: 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: 2000-01-27 23:33:57 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 Daniel Stenberg 2000-01-27 08:32:08 UTC
The following piece of the /etc/rc.d/rc.sysinit script does not work
satisfactory when the directories in question are empty:

# 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
      rm -f $afile/*
   else
      rm -f $afile
   fi
done

The if-condition should instead be written

   if [ -d "$afile" ]; then

The warning that is displayed is perfectly harmless but still annoying
since the user can't really know that it is this harmless...! ;-)
q

Comment 1 Bill Nottingham 2000-01-27 23:33:59 UTC
Will be fixed in initscripts-4.85 when it's released.