Bug 460795

Summary: /etc/cron.daily/readahead.conf references nonexistent /etc/readahead.d/*.later
Product: [Fedora] Fedora Reporter: Valdis Kletnieks <valdis.kletnieks>
Component: readaheadAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: gene-redhat, h1k6zn2m, harald, michal, poelstra, ville.skytta
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: 2008-10-18 03:47:30 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:
Bug Depends On:    
Bug Blocks: 438943    
Attachments:
Description Flags
Make readahead.cron look for the right filenames... none

Description Valdis Kletnieks 2008-09-01 07:28:19 UTC
Description of problem:
cronjob throws an error message:

/etc/cron.daily/readahead.cron:

ls: cannot access /etc/readahead.d/*.later: No such file or directory

Looking at the code, it appears that the script and the packaging of the readahead.d directory are confused whether the files are '*.later' or 'later.*'. I've attached a patch to change the script to match what's actually in the directory.  Alternatively, the files could be renamed to match what the script is expecting.

Version-Release number of selected component (if applicable):
readahead-1.4.5-1.fc10.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Valdis Kletnieks 2008-09-01 07:30:45 UTC
Created attachment 315457 [details]
Make readahead.cron look for the right filenames...

Comment 2 Jonathan Kamens 2008-09-02 18:48:53 UTC
I also get an error about /etc/readahead.d/*.early:

/etc/cron.daily/readahead.cron:

ls: cannot access /etc/readahead.d/*.early: No such file or directory
ls: cannot access /etc/readahead.d/*.later: No such file or directory

Comment 3 Ville Skyttä 2008-10-02 18:50:26 UTC
I see it too.  Would probably be better to redirect stderr of the "ls" to /dev/null as it's seemingly not at all unlikely that some of the files are not there (for example, I have neither *.later or later.*).

Also, the srpm contains default.{early,later} which are copied into place in %prep and then later simply removed in %install - I suppose those could be just dropped.

Comment 4 Michal Jaegermann 2008-10-16 21:22:36 UTC
Well, really an output from 'ls' should not be used in scripts (unless there are really good reasons and this does not seem to be the case).  Quite possibly
something like that was intended:

   FLS=$( shopt -s nullglob; echo $READAHEAD_BASE/*$LTYPE* )

although I am not entirely sure how to guess from what I see. The main
loop of this script may look somewhat like that (with possibly different
globbing; I cannot really tell):

shopt -s nullglob
for LTYPE in $TYPES; do
   FLS=$(echo $READAHEAD_BASE/*custom.$LTYPE)
   [ -n "$FLS" ] || FLS=$(echo $READAHEAD_BASE/*$LTYPE*)
   [ -n "$FLS" ] || continue
   $READAHEAD_CMD ...
done

Comment 5 Harald Hoyer 2008-10-18 03:47:30 UTC
will change to a better globbing. rawhide pipes to /dev/null