Jeff Schroeder wrote:
> On Mon, Dec 29, 2008 at 11:29 AM, D. Christopher Dale
> <[email protected]> wrote:
>   
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> It appears that a problem was introduced in the 1.4 release on my fedora
>> 10 laptop.  The following section of the %post section of my kickstarts
>> used to poduce a desired host name of dbg01.dbg.gesi (or whatever node I
>> was building).
>>
>> # set hostname and populate hosts file
>> cat >> /etc/sysconfig/networking << EOF
>> NETWORKING=yes
>> HOSTNAME=$grid$node.dbg.gesi
>> EOF
>>
>> %hostname produces: dbg.dbg.gesi.
>>
>> If I escape the . after the variable as follows:
>>
>> # set hostname and populate hosts file
>> cat >> /etc/sysconfig/networking << EOF
>> NETWORKING=yes
>> HOSTNAME=$grid$node\.dbg.gesi
>> EOF
>>
>> %hostname is dbg01.dbg.gesi.  The /etc/sysconfig/network file keeps the
>> \, as expected.
>>     
>
> Try something like this:
>
> # set hostname and populate hosts file
> #raw
> cat >> /etc/sysconfig/networking << EOF
> NETWORKING=yes
> HOSTNAME=$grid$node.dbg.gesi
> EOF
> #end raw
>
> See this for more info:
> https://fedorahosted.org/cobbler/wiki/KickstartTemplating#RawescapingandSnippets
>
>   

I don't think Cheetah won't evaluate the $grid in your example either 
(raw means don't evaluate anything), but you could do something clever like:

#set $myhost="$grid"+"$node"+".dg.gesi"

and then in the next line

HOSTNAME=$myhost

I'm not sure why it would be a regression in what you had, but that 
should be plenty safe...

--Michael

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to