On Thu, Jul 1, 2010 at 11:59 AM, James Cammarata <[email protected]> wrote:
>
> Can someone else see if they can reproduce this in a newer version? I'm
> still running 1.6.8 in our production environment, so I'm not sure if this
> has been fixed or not (or possibly even reported, since I have been paying
> minimal attention to the mailing list/trac lately).
>
> If I setup a variable snippet like this:
>
> $SNIPPET("subdir/config_${some_variable}")
>
> It doesn't work. But if I do this:
>
> $SNIPPET("subdir/config_" + $some_variable)
>
> It works fine. The odd thing is that, when using the syntax that doesn't
> work and looking at the getks output (with $some_variable="foo"), I see
> this:
>
> # Unable to read /var/lib/cobbler/snippets/subdir/config_foo
>
> So it's expanding the variable correctly at some point, even if it's just
> when printing out the error message. It seems to be an order issue, where
> the SNIPPET is not expanding the variable before looking for the file.
>
>
Try escaping the $ like this:
$SNIPPET("subdir/config_\${some_variable}")
and see if that will get you what you need. You can also do a "view
rendered" in the web gui and then look at /var/log/cobbler/cobblerd.log,
maybe you'll see a more exact messages about what it's having a problem
with.
mark
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler