[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dashes in classes?
From: |
John Valdes |
Subject: |
Dashes in classes? |
Date: |
Mon, 1 Jul 2002 20:00:54 -0500 |
User-agent: |
Mutt/1.2.5i |
Hello,
It seems that (in cfengine 1 & 2) classes can't have dashes in them.
Eg, if I try to limit, say, a shellcommands or editfiles to a class
which contains a dash:
editfiles:
123456-78::
{ /path/to/some/file
AppendIfNoSuchLine "123456-78"
}
cfengine/cfagent gives me an error like:
cf:host:cfagent.conf:31: 123456-78:: is not an absolute pathname
cf:host:cfagent.conf:31: parse error
Is this behavior intentional or a bug? It seems to exist in both
cfengine 1.6.x and 2.0.x. I couldn't find any mention in the docs
(though I might have missed it :) ) as to whether a dash ("-") has
special significance when used with a class name. Assuming it
doesn't, then this seems like a bug. If so, here's a simple (&
perhaps incomplete?) fix (tested against cfengine 2.0.3):
prompt> diff -u cflex.l.dist cflex.l
--- cflex.l.dist Sun Jun 30 18:31:35 2002
+++ cflex.l Mon Jul 1 19:38:09 2002
@@ -76,8 +76,8 @@
function [a-zA-Z_]+\([^)]*\)
qstring \"[^"\n]*\"|\'[^'\n]*\'|`[^`\n]*`
item [+]?[-.,!@a-zA-Z0-9_\200-\377]+
-id [.|!,;a-zA-Z0-9_\200-\377]+
-classt [.|!,;a-zA-Z0-9_()\200-\377]+::
+id [-.|!,;a-zA-Z0-9_\200-\377]+
+classt [-.|!,;a-zA-Z0-9_()\200-\377]+::
path [-:.,;/a-zA-Z0-9%_\200-\377]+
varpath [/$<][-.,;a-zA-Z0-9<>%@+:$*?(){}/_\200-\377]*
varitem [-.,a-zA-Z0-9<>$*?()={}/_\200-\377]*
John
-------------------------------------------------------------------------
John Valdes Department of Astronomy & Astrophysics
valdes@NOSPAMuchicago.edu University of Chicago
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Dashes in classes?,
John Valdes <=