On Sat, Oct 15, 2011 at 9:40 AM, Jörgen Maas <[email protected]> wrote:
> On Sun, Sep 18, 2011 at 4:40 PM, Idan Shinberg <[email protected]> wrote:
>>
>> my kickstart is centos.ks.inside , it has the following snippet :
>>
>> $SNIPPET('add_mounts')
>>
>> /var/lib/cobbler/snippets/add_mounts contains:
>>
>> #if profile == 1
>> echo "nfs.servers:/mount_1 mount_1 nfs defaults 0 0" >> /etc/fstab
>> #end if
>>
>> Using it results and issuing cobbler profile getks ... results in just
>> "$SNIPPET('add_mounts')" being written to stdout , instead of the snippet
>> content
>> however , if I remove the #if macro , I get :
>>
>
> is the 'profile' variable defined in the kickstart? if so, try to make it a
> global variable then:
>
> #set global profile = 1
The "profile" variable needs a $ in front of it. Also, that will be
set to a string, so it will never equal 1. You probably just want to
do:
# if $getVar("profile",None)
Which will always be true for systems, but not when kickstarting a
profile or sub-profile.
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler