Jeff Schroeder wrote:
On Mon, May 4, 2009 at 2:37 PM, James Cammarata jimi@sngx.net wrote:
On Mon, 04 May 2009 17:29:48 -0400, Michael DeHaan mdehaan@redhat.com wrote:
James Cammarata wrote:
I've already run into at least one major (in my opinion) Cheetah bug, which was improper handling of escapes. In Cheetah currently you cannot
escape
a , so trying to do \ fails. This was a major nightmare when working on Windows SIFs (response files), since all the paths are MS paths, and needing to have variables in the paths.
The solution was to add a tempate variable for backslashes and render
the
template with that, total nightmare that looked like this:
OriSrc = "${bsp}${bsp}$next_server\REMINST${bsp}$name\i386"
\$var is interpreted as "$var" always, so your variable is not interpreted.
I am guessing it might be \\$foo, not having tried it.
Escape the backslashes and also the dollar sign.
When in doubt you can also build the string in pieces using #set --Michael
The thing is, in the above example you do NOT want to escape the $, you want cheetah to evaluate the variable. Instead, Cheetah always escapes the $ (meaning your variable is not evaluated), and just prints out all the other backslashes.
Noted.... that is annoying if it's not processing the string Left-to-Right. I'd use #set in that case and build it in pieces.
--Michael
Looking in /usr/share/doc/iputils-20020927/README.bonding it would seem that RHEL4 only supports the modprobe.conf method of specifying options... so it looks like we may need to build some additional logic into the network config snippet to have it sense whether the OS being installed supports the newer method :(
Wasn't there a per-distro snippets patch that was just applied? This sounds like it will have to be used unless you want a big mess.
Or we could just not support it for RHEL 4 (?).
Per distro snippets as implemented key off the name, so it's not a good fit.
--Michael