On Thu, Mar 26, 2009 at 4:26 AM, Tom Brown <tom(a)ng23.net> wrote:
>
> Don't do that. I've got a snippet that sets the right timezone based
> on the "hostname" and put a trimmed down version on the wiki. You can
> use the same logic and put in your code:
>
>
https://fedorahosted.org/cobbler/wiki/KickstartSnippets#ConfigureTimezone...
>
> Basicly use cheetah templating to split on the hostname and recognize
> the location you are in and then run some code.
>
>
thanks for this - i achieve something similar at the moment using case but
your way seems neater.
can i ask you to explain how in your example the system_name is set as i see
it starts with
#if $getVar("system_name","") != ""
but where does 'system_name' come from ?
'system_name' is a cobbler internal variable whenever you specify
something with a system_name.
For examples compare differences between "cobbler system dumpvars
--name foo" and "cobbler profile dumpvars --name foo-profile". Michael
wrapped one of his snippets in that if block and I didn't see why at
first. When you run "cobbler validateks" it will try to render the
kickstart without a system name. Obviously this usecase will break if
you don't wrap code depending on 'system_name'. This is purely my
understanding from writing that aforementioned snippet to magically
give our systems around the globe the right timezone depending on
their hostname.
--
Jeff Schroeder
Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com