Thanks! That worked out great!

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Michael DeHaan
Sent: Friday, May 29, 2009 12:10 PM
To: cobbler mailing list
Subject: Re: setting dns-domain for suse distros

Justin Lim wrote:
> Hello,
>
> I am trying to modify the wrapper script listed on the webpage to include
> multiple scripts but I am just a beginner with the cheetah scripting and
> need some help
>
> I am wanting to pass an array? For $wrappedscript
> #set global $wrappedscript = "script1 script2 script3"
> SNIPPET::post_sles_wrappedscript
> These scripts are just shell scripts
>
> Cat post_sles_wrappedscript
>   <scripts>
>     <post-scripts config:type="list">
>       <script>
>         <interpreter>shell</interpreter>
>         <network_needed config:type="boolean">false></network_needed>
>         <source>
>         <![CDATA[
> #for $iname in $wrappedscript
> $SNIPPET($iname)
> #end for
>         ]]>
>         </source>
>         <location></location>
>       </script>
>     </post-scripts>
>   </scripts>
>
> However this is not working... can someone verify my syntax?
>
> Thanks
>   

if you want to do something like that in Cheetah, try

#for $x in $foo.split()

It might be easier just to include the CDATA stuff in the snippets, and 
have them say, "if $breed = 'suse'" inside of them instead. Not sure. It 
may make the XML easier to read (as if XML is ever easy to read, right?)




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


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

Reply via email to