I just checked the latest in SVN, and this works! files:
"/tmp/junkdir/." delete => tidy; $ cf-agent -KI -f ./testbundle.cf -> Deleted directory /tmp/junkdir On Thu, Apr 1, 2010 at 11:33 PM, Assarsson, Emil < emil.assars...@sonyericsson.com> wrote: > Ok, I placed a bug report (0000101) on it and use the workaround. > > Best regards, > Emil Assarsson emil.assars...@sonyericsson.com > Phone: +46 (0)10 8017422 > > > > > -----Original Message----- > From: help-cfengine-boun...@cfengine.org [mailto: > help-cfengine-boun...@cfengine.org] On Behalf Of Nakarin Phooripoom > Sent: torsdag den 1 april 2010 13:34 > To: Michael Potter > Cc: help-cfengine > Subject: Re: Deletion of directory doesn't work? > > IMO; it should work. Anyway I haven't tried to remove a specific folder by > a promiser yet. What I did was to pass a slist to remove multiple > directories at once so the following would work for you. > > # inputs => { "cfengine_stdlib.cf" }; > > bundle agent rmdirtest { > files: > "/tmp" > file_select => by_name("junkdir"), > depth_search => recurse("1"), > delete => delete_all; > } > > Cheers, > --Nakarin > > On Apr 1, 2010, at 1:05 PM, Michael Potter wrote: > > > Hmm I tried this on 3.0.4 just to be sure...but it's not working for me > either. I'm sure this used to work on some earlier version...and that it was > fixed more succinctly in the current version, because this has been raised > before. Perhaps not... > > > > On Thu, Apr 1, 2010 at 9:46 PM, Michael Potter <mega...@gmail.com> > wrote: > > You need to end the dir name in /. > > > > > >> On 01/04/2010 9:44 PM, "Assarsson, Emil" < > emil.assars...@sonyericsson.com> wrote: > >> > >> Hi, > >> > >> I can't remove an empty directory. I think that is should be a simple > procedure but it doesn't work. > >> What on earth do I do wrong? > >> ----- > >> bundle agent rmdirtest { > >> files: > >> "/tmp/junkdir" > >> delete => delete_all; > >> } > >> body delete delete_all { > >> dirlinks => "delete"; > >> rmdirs => "true"; > >> } > >> ----- > >> > >> Best regards > >> Operational Services LUX Application Platforms within BI Enterprise > Services > >> > >> Emil Assarsson > >> Sony Ericsson Mobile Communications AB > >> Nya Vattentornet, SE-221 88 Lund, Sweden > >> e-Mail: emil.assars...@sonyericsson.com > >> Phone: +46 (0)10 8017422 > >> "The information in this email, and attachment(s) thereto, is strictly > confidential and may be legally privileged. It is intended solely for the > named recipient(s), and access to this e-mail, or any attachment(s) thereto, > by anyone else is unauthorized. Violations hereof may result in legal > actions. Any attachment(s) to this e-mail has been checked for viruses, but > please rely on your own virus-checker and procedures. If you contact us by > e-mail, we will store your name and address to facilitate communications in > the matter concerned. If you do not consent to us storing your name and > address for above stated purpose, please notify the sender promptly. Also, > if you are not the intended recipient please inform the sender by replying > to this transmission, and delete the e-mail, its attachment(s), and any > copies of it without, disclosing it." > >> > >> > >> > >> _______________________________________________ > >> Help-cfengine mailing list > >> Help-cfengine@cfengine.org > >> https://cfengine.org/mailman/listinfo/help-cfengine > >> > > > > > > _______________________________________________ > > Help-cfengine mailing list > > Help-cfengine@cfengine.org > > https://cfengine.org/mailman/listinfo/help-cfengine > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine >
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine