[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Copy command copies directories I don't want
From: |
Mark |
Subject: |
RE: Copy command copies directories I don't want |
Date: |
Thu, 25 Aug 2005 11:03:56 -0700 |
Hi guys,
Sorry to be a pest about this...
But I'm not sure any more if there is something wrong with my filter or if
filters do not prevent the problem I am having either...
I found a thread of a guy with the same problem and filters helped him:
http://groups.google.com/group/gnu.cfengine.help/browse_thread/thread/20ee2e2bcd6886af/f9e497e9f9c7c104?q=filter&rnum=29#f9e497e9f9c
7c104
I tried to use his filter and originally I thought it fixed the problem for me
as well - even though it did not even copy the
sub-directories I *did* specify, but that's something I can work around...
But now it seems like I can not get the filter to do anything any more...
Thank you,
MARK
> -----Original Message-----
> From: help-cfengine-bounces+msalists=gmx.net@gnu.org
> [mailto:help-cfengine-bounces+msalists=gmx.net@gnu.org] On
> Behalf Of Mark
> Sent: Wednesday, August 24, 2005 2:16 PM
> To: 'Mark Burgess'
> Cc: help-cfengine@gnu.org
> Subject: RE: Copy command copies directories I don't want
>
>
> Mark,
>
> I am not sure what you mean with "name the directories you
> want explicitly". Anyway, I am still havimg problems with the
> fact that I do get directories I don't want, no the other way
> around...
>
> Another try:
>
> filters:
> { ignoredir
> Type: "dir"
> Result: "!Type"
> }
>
>
> copy:
> any::
> $(config_download_dir)/etc/
> trustkey=true
> filter=ignoredir
> action=fix
> dest=/etc/
> r=0
> mode=0644
> owner=root
> group=root
> server=$(policy_host)
> exclude=*
> ignore=*
> include=file.that.does.not.exist
> type=checksum
>
> Despite 4 exclusion-criteria (r=0, ignore, exclude and
> filter), the subfolders /etc/ha.d,
> etc/ipsec.d/autostart.d.___hq___ and others still get
> created. There is no way for me to get rid of them, except
> not to have them in te source tree to begin with...
>
> I though I'd just keep a tree with all the files I need for
> the various copy actions for my different classes and then
> for each copy action, I use an include list with the
> filenames I need. But I guess it doesn't work that way... How
> else am I supposed to do this??? I can't help it, but I
> think there HAS to be a way to disable creation of
> directories if they are not explicitly included in a filter
> or include list...
>
> How do other people deal with this? I can't imagine that
> nobody else had problems with it. Although, I must admit that
> I did not notice this for a long time, because most of the
> directories that get created unintentionally are already
> there anyway...
>
> Thanks,
>
> MARK
>
>
> > -----Original Message-----
> > From: Mark Burgess [mailto:mark@iu.hio.no]
> > Sent: Wednesday, August 24, 2005 9:00 AM
> > To: Mark
> > Cc: 'Mark Burgess'; help-cfengine@gnu.org
> > Subject: RE: Copy command copies directories I don't want
> >
> >
> >
> > You can set recurse=0 and name the directories you want
> > explicitly, or you can use a wildcard path...
> >
> > M
> >
> > On Wed, 2005-08-24 at 08:56 -0700, Mark wrote:
> > > Hi Mark,
> > >
> > > Using ignore= would help me short term, but long-term there
> > is no way
> > > to add each new directory that I add into the /etc
> directory to the
> > > ignore list. Sooner or later I (or somebody else) will add
> > a directory
> > > and forget to put it in the ignore list. Is there any other
> > way to NOT
> > > traverse any subdirectories EXCEPT the ones I want?
> > >
> > >
> > > I have
> > >
> > > etc
> > > * |- ldap.conf
> > > |- pam.d
> > > * | +- system-auth
> > > |
> > > |- openldap
> > > * | +- ldap.conf
> > > |
> > > |- ha.d
> > > | +- <somefiles>
> > > +- ipsec.d
> > > |- autostart.d.___hq___
> > > + <somefiles>
> > >
> > > The ones with the * are the files I want (ldap.conf,
> > > openldap/ldap.conf, pam.d/system-auth). I do NOT want ha.d,
> > ipsec.d or
> > > autostart.d.___hq___
> > >
> > >
> > > Thanks,
> > >
> > > MARK
> > >
> > >
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Mark Burgess [mailto:Mark.Burgess@iu.hio.no]
> > > > Sent: Wednesday, August 24, 2005 12:42 AM
> > > > To: Mark
> > > > Cc: help-cfengine@gnu.org
> > > > Subject: Re: Copy command copies directories I don't want
> > > >
> > > >
> > > > ignore=
> > > >
> > > > On Tue, 2005-08-23 at 23:55 -0700, Mark wrote:
> > > > > $(config_download_dir)/etc/
> > > > > trustkey=true
> > > > > action=fix
> > > > > dest=/etc/
> > > > > r=inf
> > > > > mode=0644
> > > > > owner=root
> > > > > group=root
> > > > > server=$(policy_host)
> > > > > include=hosts
> > > > > include=openldap/ldap.conf
> > > > > include=ldap.conf
> > > > > include=nsswitch.conf
> > > > > include=system-auth
> > > > > type=checksum
> > > > >
> > > > > The above configuration copies a folder
> > > > > /etc/ipsec.d/autostart.d.___hq___ from the policy host
> > to the local
> > > > > /etc/ directory. However, it does not copy the contents
> > (files) of
> > > > > that folder. Since none of the include-patterns match this
> > > > directory
> > > > > name, I did not expect it to copy it... How can I
> prevent this
> > > > > directory from being copied?
> > > > >
> > > > > I tried filters:
> > > > > { ignore_dirs
> > > > > Type: "dir"
> > > > > Result: "!Type"
> > > > > }
> > > > >
> > > > > but now it does not copy the system-auth (in /etc/pam.d) and
> > > > > openldap/ldap.conf (in /etc/openldap) any more either
> > although they
> > > > > are specified in the include-patterns.
> > > > >
> > > > > Is there a way to do what I want without having to make
> > a new copy
> > > > > command for each subfolder???
> > > > >
> > > > > I found discussions about similar problems in the past,
> > but no fix
> > > > > yet...
> > > > >
> > > > > Thanks,
> > > > >
> > > > > MARK
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Help-cfengine mailing list
> > > > > Help-cfengine@gnu.org
> > > > > http://lists.gnu.org/mailman/listinfo/help-cfengine
> > > >
> > >
> >
>
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>
- RE: Copy command copies directories I don't want, (continued)
- RE: Copy command copies directories I don't want, Mark, 2005/08/24
- RE: Copy command copies directories I don't want, Mark, 2005/08/24
- RE: Copy command copies directories I don't want, Ed Brown, 2005/08/24
- RE: Copy command copies directories I don't want, Mark, 2005/08/24
- RE: Copy command copies directories I don't want, Ed Brown, 2005/08/25
- RE: Copy command copies directories I don't want, Mark, 2005/08/25
- RE: Copy command copies directories I don't want, Tim Nelson, 2005/08/29
- RE: Copy command copies directories I don't want, Ed Brown, 2005/08/30
- RE: Copy command copies directories I don't want, Tim Nelson, 2005/08/30
- RE: Copy command copies directories I don't want, Tim Nelson, 2005/08/29
- RE: Copy command copies directories I don't want,
Mark <=
- RE: Copy command copies directories I don't want, Mark Burgess, 2005/08/29
- How to organize directories and files for a config file repository?, Mark, 2005/08/29
- RE: Copy command copies directories I don't want, Mark, 2005/08/29
- Re: Copy command copies directories I don't want, Tim Nelson, 2005/08/24