[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
'%' in filename -> parse error
From: |
Ylitalo Juha. O |
Subject: |
'%' in filename -> parse error |
Date: |
Thu, 17 Jan 2002 16:29:56 +0200 |
User-agent: |
Mutt/1.3.22.1i |
System: Redhat Linux 7.2
Cfengine: 2.0a14
I am still relatively new with cfengine and my problem will definately
sound like something that might be documented in cfengine 2.0
documentation, but ...
I was trying to create editing rules (editfiles:) for
/etc/gconf/gconf.xml.examples/system/gnome-vfs/%gconf.xml file, when I
stumbled into very annoying parsing error, which says that
Wildcards cannot be used in this context:
I did some playing around and appearantly that error message appears,
whenever you have percent sign in filename within editfiles section. I
tried to put filename in quotes (double and single) and escape that %
percent sign with backslash as an attempt to get around the problem,
but none of these operations were able to fix the situation. Since I
can't change the filename, which I need to edit, I am hoping that
someone would be able to tell me, how I can edit file, which name has
percent sign in it.
The file is pretty much following:
editfiles:
{ /var/cfengine/inputs/%gconf.xml
ReplaceAll '"http-proxy-host" type="string"><stringvalue>[^<]+<stringvalue>'
With '"http-proxy-host" type="string"><stringvalue>1.2.3.4</stringvalue>'
ReplaceAll '"http-proxy-port" type="int" value="[0-9]+"/>' With
'"http-proxy-port" type="int" value="56"/>'
}
Error message is following:
[root@jylitwork root]# cfagent
cf:jylitwork.lnx.nokia.com:/var/cfengine/inputs/cf.proxies:16: Wildcards cannot
be used in this context:
cf:jylitwork.lnx.nokia.com:/var/cfengine/inputs/cf.proxies:16: parse error
cfengine:jylitwork::Execution terminated after parsing due to errors in program
[root@jylitwork root]#
And if I put quotes around filename, it changes to:
[root@jylitwork root]# cfagent
cf:jylitwork.lnx.nokia.com:/var/cfengine/inputs/cf.proxies:16: Unknown edit
action
cf:jylitwork.lnx.nokia.com:/var/cfengine/inputs/cf.proxies:16: parse error
cfengine:jylitwork::Execution terminated after parsing due to errors in program
P.S. If anyone needs specfile to generate RPM from cfengine, let me know.
--
Juha Ylitalo juha.o.ylitalo@nokia.com <work e-mail>
"Some tools are used, because its policy, others because they are good."
- '%' in filename -> parse error,
Ylitalo Juha. O <=