Forum: Cfengine Help
Subject: Re: Editing only the first line in a file
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,21478,21534#msg-21534

It would have to read and rewrite the whole file either way, since I'm changing 
the first line.  It seemed that the best I could do is to limit the lines upon 
which it also has to do a regex comparison. :)

Yes, I'm using ifelapsed to limit the execution frequency, and (I think) 
backgrounding it.  The reason I don't just distribute the files to begin with 
is that it's mostly perl files installed by an RPM (webmin), and I have to 
change the perl interpreter so that they will work properly when run under 
Apache rather than using the default miniserv.pl.  We're additionally 
developing our own modules (which are additional perl scripts), and it's easier 
to do that through the webmin interface than to copy the files over + edit all 
of the places where the list of installed modules are tracked.  So, the easiest 
overall solution (not that this is particularly "easy") is to let RPM and 
webmin put the files in place / track internal states, and just have Cfengine 
make sure the perl interpreter path is right.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to