Bug 47859 - errors from cron script caused by changes in man
errors from cron script caused by changes in man
Status: CLOSED DUPLICATE of bug 44117
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-07 22:12 EDT by Michal Jaegermann
Modified: 2007-04-18 12:34 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-09 11:35:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Errors from cron when tmpwatch runs each day (116 bytes, text/plain)
2001-07-08 10:54 EDT, Tom Diehl
no flags Details
skips directories that didn't exist on the parameter list (637 bytes, patch)
2001-07-16 01:15 EDT, Arenas Belon, Carlo Marcelo
no flags Details | Diff

  None (edit)
Description Michal Jaegermann 2001-07-07 22:12:41 EDT
Description of Problem:
After recent changes to 'man' package /etc/cron.daily/tmpwatch
trips on missing directories in /var/cache/man (or /var/catmat,
whatever the case may be) and one ends up with an error from lstat.

This goes across architectures and various distributions.
Comment 1 Michal Jaegermann 2001-07-07 22:41:41 EDT
Come to think of it - it is most likely better to produce in that cron
script a list of directories to process with a help of 'find -type d ...'
than just comment out these 'man' lines.
Comment 2 Tom Diehl 2001-07-08 10:54:15 EDT
Created attachment 22989 [details]
Errors from cron when tmpwatch runs each day
Comment 3 Tom Diehl 2001-07-08 10:55:55 EDT
Although this bug is against 7.x it also applies to 6.x machines.
Comment 4 Gerald Teschl 2001-07-09 04:57:04 EDT
Very annoying on large sites where this triggers a useless email form every box
per day!

Please fix the script for good by checking that a dir exists befor calling
tmpwatch on it.
Also applies to current rawhide....
Comment 5 Gerald Teschl 2001-07-09 05:16:16 EDT
Just looked at the script /etc/cron.dayly/tmpwatch and noticed that none of the
directories /var/cache/man/{X11R6/cat?,cat?,local/cat?} and
/var/catman/{X11R6/cat?,cat?,local/cat?} does exist. Souln't the entire script
be
removed. Respectively, shouldn't the cript be moved to the coresponding
packages which own these directories!?
Comment 6 Michal Jaegermann 2001-07-09 11:35:16 EDT
> "none of the directories ... does exist"

This is exactly that change in recent 'man' package the original report
is talking about.

Removing the whole script would be a grave mistake for many reasons
  - it does some other things too
  - despite the latest Red Hat moves _you_ may want to re-create these
    directories (hopefuly after making yourself familiar with all
    side-effects)
  - it may happen that you are using more recent 'tmpwatch' package
    then 'man' package
  - somebody packaging 'man' may change their mind in a future again
Because all of that a list of directories to traverse should be created
"on the spot" like my first comment proposed.  Something like that:

   hours=240
   if [ -d /var/cache/man ] ; then
     cd /var/cache/man
     find . -type d -depth -exec /usr/sbin/tmpwatch -f $hours "{}" \;
   fi

This should be good enough even for directories with "funny" characters
in names.  So, here, you have a temporary fix (not tested) until you
will get an official one.
Comment 7 Arenas Belon, Carlo Marcelo 2001-07-15 23:33:20 EDT

*** This bug has been marked as a duplicate of 44117 ***
Comment 8 Arenas Belon, Carlo Marcelo 2001-07-16 01:12:48 EDT
tmpwatch-2.7.4-1 on rawhide has a fixed script

something interesting tought would be to add some inteligence to the tmpwatch 
program so it just don't die if some of the parameters didn't exist

the attached skipdir.diff should do the trick (applied to 2.7.4 sources)

sadly i'd been unable to compile it, but i guess it is too basic for not working

another interesting addon could be to add something like a /etc/tmpwatch.d/ 
directory were different packages that want to instruct tmpwatch to clean their 
temp files could drop a configuracion file, so a change on anyother package 
(like man this time) won't break a running tmpwatch configuration
Comment 9 Arenas Belon, Carlo Marcelo 2001-07-16 01:15:02 EDT
Created attachment 23667 [details]
skips directories that didn't exist on the parameter list

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