help-cfengine
[Top][All Lists]
Advanced

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

Re: How to delete directories with ${name}


From: Mark . Burgess
Subject: Re: How to delete directories with ${name}
Date: Thu, 13 Mar 2003 19:31:45 +0100 (MET)

Why not do something simple like

pattern=??Repository?


On 13 Mar, address@hidden wrote:
> Hello
> 
> when I intially created my cfengine scripts, I misconfigured and ended up 
> with a
> number of machines getting an empty directory called /${Repository}
> 
> Now i can simply delete them by hand but I thought doing it via cfengine would
> be appropriate.  So I have (as a test) created /tmp/${Repository} and a test
> scripts
> 
> 
> control:
> 
>      actionsequence = ( tidy )
> 
> tidy:
>      "/tmp" pattern=$(dollar){Repository} age=0 rmdirs=true recurse=0
>       "/tmp" pattern=khalid age=0 rmdirs=true recurse=0
> 
> The diretory khalid gets removed but not ${Repository}. Am I specifying the
> pattern wrong in some way?
> I have tried a macro assigmentt and then using that macro as the pattern name
> but to no avail.
> 
> 
> running with -d 2 gives (version of cfengine is 2.0.2 on solaris)
> 
> ---------------------------------------------------------------------
> Tidying by directory
> ---------------------------------------------------------------------
> 
> Directory /tmp
> Directory /tmp
> ExpandWildCardsAndDo(/tmp=/tmp)
> ExpandWildCardsAndDo(=)
> TidyWrapper(/tmp)
> GetLock(tidy,_tmp,time=1047579376), ExpireAfter=120, IfElapsed=1
> GetLastLock()
> CheckOldLock(lock._tmp_cf_rep.fin.tidy._tmp)
> Unable to find lock data lock._tmp_cf_rep.fin.tidy._tmp
> SetLock(lock._tmp_cf_rep.fin.tidy._tmp)
> PutLock(lock._tmp_cf_rep.fin.tidy._tmp)
> Unable to delete lock [lock._tmp_cf_rep.fin.tidy._tmp]: DB_NOTFOUND: No 
> matching
>  key/data pair found
> IgnoredOrExcluded(/tmp)
> IgnoreFile()
> Tidy: opening dir /tmp
> Filename /tmp/. is classified as ignorable
> Filename /tmp/.. is classified as ignorable
> IgnoreFile(ps_data)
> TidyParticularFile(/tmp/ps_data,ps_data)
> IgnoreFile(smc898)
> NotMountedFileSystem
> MAXRECURSE ran out, quitting at /tmp/smc898
> TidyParticularFile(/tmp/smc898,smc898)
> IgnoreFile(.pcmcia)
> NotMountedFileSystem
> MAXRECURSE ran out, quitting at /tmp/.pcmcia
> TidyParticularFile(/tmp/.pcmcia,.pcmcia)
> IgnoreFile(.X11-unix)
> NotMountedFileSystem
> MAXRECURSE ran out, quitting at /tmp/.X11-unix
> TidyParticularFile(/tmp/.X11-unix,.X11-unix)
> IgnoreFile(.X11-pipe)
> NotMountedFileSystem
> MAXRECURSE ran out, quitting at /tmp/.X11-pipe
> TidyParticularFile(/tmp/.X11-pipe,.X11-pipe)
> IgnoreFile(khalid.path)
> TidyParticularFile(/tmp/khalid.path,khalid.path)
> IgnoreFile(r)
> TidyParticularFile(/tmp/r,r)
> IgnoreFile(DNS)
> NotMountedFileSystem
> MAXRECURSE ran out, quitting at /tmp/DNS
> TidyParticularFile(/tmp/DNS,DNS)
> IgnoreFile(passwd.temp)
> TidyParticularFile(/tmp/passwd.temp,passwd.temp)
> IgnoreFile(admin1.mas.xanalys.com)
> TidyParticularFile(/tmp/admin1.mas.xanalys.com,admin1.mas.xanalys.com)
> IgnoreFile(sendmail-cf-j.21979)
> TidyParticularFile(/tmp/sendmail-cf-j.21979,sendmail-cf-j.21979)
> IgnoreFile(sendmail-cf-R.21979)
> TidyParticularFile(/tmp/sendmail-cf-R.21979,sendmail-cf-R.21979)
> IgnoreFile(cf.rep)
> TidyParticularFile(/tmp/cf.rep,cf.rep)
> IgnoreFile(ccc)
> TidyParticularFile(/tmp/ccc,ccc)
> IgnoreFile(${Repository})
> NotMountedFileSystem
> MAXRECURSE ran out, quitting at /tmp/${Repository}
> TidyParticularFile(/tmp/${Repository},${Repository})
> IgnoreFile(khalid)
> NotMountedFileSystem
> MAXRECURSE ran out, quitting at /tmp/khalid
> TidyParticularFile(/tmp/khalid,khalid)
> FileObjectFilter(/tmp/khalid)
> IgnoredOrExcluded(/tmp/khalid)
> cfengine: EmptyDir(/tmp/khalid)
> Filename /tmp/khalid/. is classified as ignorable
> Filename /tmp/khalid/.. is classified as ignorable
> Matched khalid to khalid in /tmp/khalid
> DoTidyFile(/tmp/khalid,khalid)
> Checking tidy topmost directory /tmp
> TidyParticularFile(/tmp,tmp)
> ReleaseCurrentLock(lock._tmp_cf_rep.fin.tidy._tmp)
> PutLock(last._tmp_cf_rep.100.fin.tidy._tmp)
> LockLog(Lock removed normally )
> End PATHTIDY:
> No home patterns to search
> Job start time set to Thu Mar 13 18:16:16 2003
> *
> 
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-cfengine



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~






reply via email to

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