Re: Upating variables from a %pre script

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

 



Adrian,

Thats what I thought but I was getting an error and in fact the kickstart was bombing out with an error and from what i could see it was as if the include file was trying to be sourced before it actually existed. Whats interesting is that after seeing your reply I tweaked the kickstart so instead of saying somthign like

#if $userConfig == "1"
$SNIPPET('spacewalk/1/user_input')
%include /tmp/ks.settings
#end if

which completed failed I changed to

#if $userConfig == "1"
%pre --interpreter /usr/bin/python
$SNIPPET('spacewalk/1/user_input')
%end
%include /tmp/ks.settings
#end if

Now, this didnt fully work but at least it didnt crash out either .... at the end of the snippet i had a file /tmp/ks.settings with

#set global $buildType = "CUSTOMER"

which to my mind should update the kickstrt profiles buildType variable but the code later in the kickstart

ie

#if $buildType != "INTERNAL"
$SNIPPET('spacewalk/1/packages.customer')
#end if

suggests otherwise ie the extra packages in the snippet are not installed ...


Its starting to get a little frustrating since from all that I have read this should work ,,,,

rgds

Matt B


On 30/08/12 18:42, Adrian Cruceru wrote:
Hi Matt,

In kickstart file you could use:

%include /tmp/configvalue.txt

And in %pre you could just add whatever you want in that file, given
kickstart syntax.
i.e: echo "bootloader --location=mbr" > /tmp/configvalue.txt

Regards,
Adrian

On 08/30/2012 07:43 AM, Matt Bryant wrote:
All,

I was wondring if someone could point me in the right direction Is it
possible to update a vaiable in kickstart file give user input in a
%pre script. Basically i have a varibale buildType and whilst I can
override the default value of the profile using ksmeta input when
adding a system to cobbler would like to also be able to override
given user input from %pre script.

Have tried just about everything i can think of including creating a
file ks.settings which held the variations

#set global $buildType = "value"
#set global buildType ="value"
#set buildType = "value"
#set $buildType = "value"

then doing a #include but that doesnt seem to work ...

Is there in fact a way this can be done ??

Any help appreciated.

rgds

Matt B.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list



_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


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