help-cfengine
[Top][All Lists]
Advanced

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

import a whole directory of files?


From: Matthew Palmer
Subject: import a whole directory of files?
Date: Fri, 7 Oct 2005 11:08:27 +1000
User-agent: Mutt/1.5.6+20040907i

Is there any way to import a whole directory of files with one import line,
that is, without having to list all of the filenames individually?  So far,
I've tried:

import:
        hosts/*
        
Which produced "cfengine:: Can't open file /tmp/hosts/*"

and also:

import:
        hosts
        
Which produced the rather unpleasant error message "input in flex scanner
failed".

That's my pool of immediate ideas expended.

I'm aware of the possible security implications of arbitrarily including
files which you don't know at config time, but I don't think it's
worse than running files owned by another user (which cfagent does quite
happily).  If you specify a directory which other users can write to in your
cfengine config file, then you pretty much get what you ask for...

Assuming this functionality doesn't yet exist in cfengine, would a patch to
provide it likely be accepted?  It would kill several birds with one stone
in a system I'm working on at the moment.  Which method would be preferred
-- wildcarding, or just specify a directory?  Wildcarding seems like it'd be
more explicit, but it's probably a fair bit more coding... <grin>

- Matt

Attachment: signature.asc
Description: Digital signature


reply via email to

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