RE: [et-mgmt-tools] Cobbler - Templating not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hmm. I applied this patch and now it doesn't seem to
be replacing the TEMPLATE::env line at all.

--Tim

> -----Original Message-----
> From: Michael DeHaan [mailto:mdehaan@xxxxxxxxxx]
> Sent: Wednesday, October 25, 2006 11:06 AM
> To: Foreman, Tim
> Cc: 'et-mgmt-tools@xxxxxxxxxx'
> Subject: Re: [et-mgmt-tools] Cobbler - Templating not working?
> 
> 
> Tim,
> 
> Yes, you've found a bug.
> 
> Here's the fix:
> 
> diff -r 25f009106e21 cobbler/action_sync.py
> --- a/cobbler/action_sync.py    Wed Oct 25 11:36:47 2006 -0400
> +++ b/cobbler/action_sync.py    Wed Oct 25 12:02:44 2006 -0400
> @@ -323,7 +323,8 @@ class BootSync:
>          data = fd.read()
>          fd.close()
>          for x in metadata.keys():
> -            data = data.replace("TEMPLATE::%s" % x, metadata[x])
> +            if x != "":
> +               data = data.replace("TEMPLATE::%s" % x, metadata[x])
>          fd = open(out_path, "w+")
>          fd.write(data)
>          fd.close()
> 
> 
> I've gone ahead and pushed this upstream (to the public mercurial 
> repository) along with some other things I've been working on 
> (which may 
> be a bit unstable).   If you like, you can try pulling from there 
> (though today it's probably not the stablest thing in 
> existance), or you 
> can just apply the patch yourself.
> 
> Thanks,
> 
> Michael
> 
> Foreman, Tim wrote:
> > I have installed Cobbler and am trying to get the kickstart 
> templating
> > to work with no success.
> >
> > I have added a line to my kickstart template that look like this:
> >
> > INSTALL_ENV=TEMPLATE::env
> >
> > Then I setup my distro like this:
> >
> > cobbler distro add --name=rhel4u4 \
> > --kernel=/var/www/html/kickstart/rhel4u4/i386/isolinux/vmlinuz \
> > --initrd=/var/www/html/kickstart/rhel4u4/i386/isolinux/initrd.img
> >
> > I created a profile like this:
> >
> > cobbler profile add --name=base_test --distro=rhel4u4 \
> > --kickstart=/etc/cobbler/ks4_base.cfg
> >
> > And then I added a system like this:
> >
> > cobbler system add --name=00:15:60:A7:6E:56 --profile=base_test \
> > --ksmeta="env=mtc"
> >
> > After the cobbler sync command, the kickstart file that is created
> > has the line:
> >
> > INSTALL_ENV=env
> >
> > Am I doing something wrong, or is the templating not working for
> > some reason?
> >
> > Thanks for any help.
> > --
> > Timothy W. Foreman ~ Security Administrator ~ tforeman@xxxxxxxxx
> > (651) 365-4181     ~ Internet Broadcasting  ~ www.ibsys.com
> > --
> > The Onion: Have you decided what you want to be when you grow up?
> > Berkeley Breathed: Dad. The rest is frosting.
> >
> > _______________________________________________
> > et-mgmt-tools mailing list
> > et-mgmt-tools@xxxxxxxxxx
> > https://www.redhat.com/mailman/listinfo/et-mgmt-tools
> >   
> 


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux