petermity <[email protected]> wrote: >Jörgen Maas <[email protected]> wrote: > >>You could provide a KS meta variable I guess. >> >>On Tue, Feb 15, 2011 at 8:37 AM, petermity <[email protected]> wrote: >>> I would like to note the version of Cobbler used to create a unit - that >>> is, in %post, grab the version string and copy it into a file in the >>> created unit's /root directory, similar to how Cobbler's $kickstart_done >>> puts the kickstart there as cobbler.ks. >>> >>> Doing profile dumpvars, I don't see Cobbler's version string. Is there a >>> way to do this? > >That wouldn't work well - it would be static, and probably >forgotten when I upgraded Cobbler. > >I have figured out a work-around that makes it automatic: add a >script file to: > > /var/lib/cobbler/triggers/sync/post > >with: > >#!/bin/bash >cobbler --version | grep Cobbler | sed 's/ /=/' > /somewhere/cobbler-version > >resulting in each "cobbler sync" producing that file containing: > > Cobbler=2.0.10 > >Then in a kickstart I can copy that file to the target via NFS or >HTTP, then later I can see what version was used to create the >target, either just by looking at the file, or sourcing it to get >the version and show it somewhere. > > >It sure would be a lot easier if every Cobbler entity (distro, >profile, system, image) simply had a variable $cobbler_version.
I submitted an enhancement issue on this: https://fedorahosted.org/cobbler/ticket/650 _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
