Differences between version 4 and previous revision of CFEngineNotes.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Monday, October 25, 2004 2:02:46 pm | by AristotlePagaltzis | Revert |
Older page: | version 3 | Last edited on Sunday, October 24, 2004 3:24:36 pm | by PhilMurray | Revert |
@@ -1,19 +1,22 @@
-Notes for
[CFEngine]
+!!!
[CFEngine] says "No preconfiguration file" even though I have one
-!CFEngine says "No preconfiguration file" even though I have a preconfiguration file?
-
You need to put cf.preconf in /var/cfengine not /var/cfengine/inputs as you might think.
+You need to put <tt>
cf.preconf</tt>
in <tt>
/var/cfengine</tt>,
not <tt>
/var/cfengine/inputs</tt>
as you might think.
-!I'm setting up groups in an ''
import''
ed file and then trying to import files based on those groups
-You need to add the group/class with "!AddInstallable" otherwise CFengine will skip that when parsing.
+!!
! I'm setting up groups in an <tt>
import</tt>
ed file and then trying to import files based on those groups
-!How do I write a config for a "block" based config file like
/etc
/pcmcia/wireless
.opts?
+[CFEngine] will skip the group
/class when parsing unless you add it with <tt>~AddInstallable<
/tt>
.
-we
use:
- !
LocateLineMatching "case \"\$ADDRESS\" in "
- !
BeginGroupIfNoLineMatching "\*,\*,\*,$(macAddrEth1)\)"
- !
ResetSearch "1"
- !
LocateLineMatching "case \"\$ADDRESS\" in"
- !
InsertLine "*,*,*,$(macAddrEth1))"
- !
InsertLine " IPADDR=\"$(ipAddrEth1)\""
- ''etc
...''
- !
EndGroup
+!!! How do I write a config for a "block" based config file like <tt>/etc/pcmcia/wireless.opts</tt>?
+
+We
use:
+
+<verbatim>
+
LocateLineMatching "case \"\$ADDRESS\" in "
+BeginGroupIfNoLineMatching "\*,\*,\*,$(macAddrEth1)\)"
+ ResetSearch "1"
+ LocateLineMatching "case \"\$ADDRESS\" in"
+ InsertLine "*,*,*,$(macAddrEth1))"
+ InsertLine " IPADDR=\"$(ipAddrEth1)\""
+ #
...
+EndGroup
+</verbatim>