help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tidy not deleting links and/or directories


From: Jeff Sheltren
Subject: Re: tidy not deleting links and/or directories
Date: 12 Feb 2003 08:48:12 -0800

Chris, thanks for the help.  It appears that I pasted the wrong cf.test
file after making many changes trying to get it to work.

My current tidy line looks like:

/tmp    pat=*       recurse=inf   age=0 rmdirs=all dirlinks=delete
links=tidy

It is still not deleting symlinks located in subdirectories in /tmp
though...

ie.
Output will include:
cfengine:scooby: Non-empty directory /tmp/example-dir, skipping..

Inside that directory there is a symlink without a target (the target
has moved or been deleted).

[root@scooby tmp]# ls -l example-dir/
total 0
lrwxrwxrwx    1 root   wheel          57 Jan 23 18:58 link ->
non_existant_file

How can I force cfengine to delete these links?

Thanks,
Jeff

On Tue, 2003-02-11 at 17:04, Chris Edillon wrote:
> On 11 Feb 2003, Jeff Sheltren wrote:
> 
> > Hi, I am having a problem trying to clean out /tmp using cfengine's tidy
> > action.  What I would like to do is delete everything in /tmp.
> > 
> > Here is a sample script that does not act as I feel it should:
> > [root@scooby cf]# cat cf.test
> > control:
> > 
> > 
> >         actionsequence = ( tidy )
> > 
> > 
> > tidy:
> > 
> > 
> >         /tmp    pat=*       recurse=0   age=0 rmdirs=all dirlinks=delete
> > links=tidy
> > 
>   rmdirs=all only deletes empty directories, and you have recurse=0
> meaning that the directory contents are never deleted as tidy never
> descends into the subdirectories.  try setting R=inf.
> 
> 
> chris
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]