Hi,

anaconda has an %include directive, but that only works for local
files. The usual trick is to %pre a wget and %include it later on. But
that doesn't work if the parent kickstart file is the one defining the
base parameters like which URL to install from etc.

Also %including a prerendered kickstart file isn't really cobbler
style, the variables could have changed and the included rendered file
would reflect the old settings of the parent profile.

As a workaround I'm doing the following on top of every kickstart file:

#if $getVar("ksparent","") != ""
  #include $ksparent
#end if

But ksparent needs to be provided and I'm using the poor man's API as

ksparent=`cobbler profile dumpvars --name=Parent | grep "^ 'kickstart':" | sed 
-e"s| 'kickstart': '\(.*\)',$|\1|"`
...
cobbler profile add [...] --inherit=Parent --ksmeta="ksparent=$ksparent" [...]

It would be nice if ksparent could be set automatically by cobbler and
if a simple scriplet like
$ cat /var/lib/cobbler/snippets/include_parent
#if $getVar("ksparent","") != ""
  #include $ksparent
#end if

would be referenced on all sample kickstart files as

$SNIPPET('include_parent')

Thanks!
-- 
Axel.Thimm at ATrpms.net

Attachment: pgpmOfNs9zvCa.pgp
Description: PGP signature

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

Reply via email to