|
From: | Chip Seraphine |
Subject: | Editfiles: Iterating without an iterator |
Date: | Tue, 30 Sep 2003 14:34:24 -0500 |
User-agent: | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121 |
I am looking to implement a task that does a little editfiles: work in all my user's rc files. The magic 'home' variable is useful here, but I'd rather play it safe and use an acutal list of home directories rather than assuming that everything in a certain dir must be a user home directory...
The ideal solution would be to have a module do some getpwent calls or whatever and spit out a result of "=homedirs=/home/foo/bar:/home/foo/qux"... et cetera type result, than iterate thru it. Regrettably, editfiles doesn't seem to support iterators, which makes this not-so-doable.
So two questions:1) Does anybody know if there are plans to broaden the iterator support to include editfiles: targets?
2) Failing #1, does anybody know of a clever approach to running editfiles: on a dynamic list of files? All I can think of so far is to write a module in sh (or whatever) and have it repeatedly call a small cfengine script, but that seems horribly kludgey (not to mention heavy).
[Prev in Thread] | Current Thread | [Next in Thread] |