Good catch! There was indeed an issue (for ages!) when parsing a string
starting with "#"...
Here is a patch in attachment (you can apply it in the robinhood source
tree by running "patch -p 1 < the_patch_file"),
or wait a few days until it is pushed to git master branch.
Regards
Thomas
On 10/06/15 17:12, Loris Bennett wrote:
Hi,
I changed a FileClass definition from
FileClass backup_files {
Definition {
name == "*~"
}
}
to
FileClass backup_files {
Definition {
name == "*~"
or
name == "#*#"
}
}
and now I get the error
Error reading configuration file '/etc/robinhood.d/tmpfs//home.conf': in
"/etc/robinhood.d/tmpfs//home.conf", line 32: missing closing
quote. (syntax error, unexpected _ERROR_, expecting IDENTIFIER or
NON_IDENTIFIER_VALUE or ENV_VAR) at ' ' line 33 in
'/etc/robinhood.d/tmpfs//home.conf'
where line 32 is the line containing "#*#".
Do the hash signs need to be escaped in some way?
Cheers,
Loris
diff --git a/src/cfg_parsing/conf_lex.l b/src/cfg_parsing/conf_lex.l
index fec0e78..87818fb 100644
--- a/src/cfg_parsing/conf_lex.l
+++ b/src/cfg_parsing/conf_lex.l
@@ -369,8 +369,11 @@ IDENTIFIER_CHAR [a-zA-Z0-9_.\-]
<STRING2>\n {snprintf(err_str,ERRLEN,"in \"%s\", line %d: closing quote
missing.",current_file,yylineno); set_error(err_str);yylineno++;return _ERROR_;}
<STRING2>. {YY_BUFFER_APPEND(yytext);DEBUG_LEX("%c",*yytext);/* caractere
de la chaine */}
-{COMMENT} ;/* ignore */
-{COMMENT2} ;/* ignore */
+<INBLOC>{COMMENT} DEBUG_LEX("comment: \"%s\"\n", yytext);/* ignore */
+<YY_INIT>{COMMENT} DEBUG_LEX("comment: \"%s\"\n", yytext);/* ignore */
+<INBLOC>{COMMENT2} DEBUG_LEX("comment: \"%s\"\n", yytext);/* ignore */
+<YY_INIT>{COMMENT2} DEBUG_LEX("comment: \"%s\"\n", yytext);/* ignore */
+
{SPACE} ;/* ignore */
{NL} yylineno++;/* ignore */
------------------------------------------------------------------------------
Full-scale, agent-less Infrastructure Monitoring from a single dashboard
Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
Physical-Virtual-Cloud Infrastructure monitoring from one console
Real user monitoring with APM Insights and performance trend reports
Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140
_______________________________________________
robinhood-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/robinhood-support