Thanks for your fast answer

In the meantime I downloaded kickseed and looked at code and figured out that 
you handled %include directive.

There was no error in syslog because I was making use of the syntax :

%pre
(

        python .....

} >> /tmp/pre.log 2 > &1

So STDERR and STDOUT were redirected 
After removing this redirection I relooked at syslog again and in same time of 
your answer i have the following :

kickseed: /var/spool/kickseed/parse/pre.section: line 6: python: not found
kickseed: /var/spool/kickseed/parse/pre.section: line 9: python: not found



So I will definitively wget to make what python was doing or maybe use wget to 
retrieve the python interpreter to execute my python code.

I was using python to import file but also to perform some stuff about the 
particular option :

part swap --recommended

this option is not well programmed in anaconda and do not even respect the own 
RedHat specification in regards on amount of memory and corresponding swap that 
has to be sized.

My own python code do what the specification say and this is why I execute it 
in %pre section to dynamically create the needed amount of swap 
(if you want I can share this part of code)


Is there any chance to ever have python available for %pre , or maybe it is 
more on purpose to add it directly in the netboot image ???



Another question regarding kickseed is the support of option : kssendmac

I do not success to have this working and finally I added directly the MAC like 
this :

ks=http://my_cgi_script_that_generate_ks_file&MAC=XXXXXXXXXXXX


Finaly I do not define me as an expert programmer but I have some experience in 
automatic deployment and if there is a need to help on kickseed this will be 
with pleasure.

Thanks again
Regards
Stephane


-----Original Message-----
From: Colin Watson [mailto:cjwat...@ubuntu.com] 
Sent: Thursday, March 26, 2009 5:51 PM
To: MAILLAN-XID, Stephane
Subject: Re: ubuntu purpose

On Thu, Mar 26, 2009 at 04:07:04PM +0100, MAILLAN-XID, Stephane wrote:
> I do not know if the is the regular way to ask you support on ubuntu
> deployment, if it is not please let me know where I can post you my
> question to get a chance to have it answered.

Please use my Ubuntu e-mail address rather than my personal one. In
future, ubuntu-installer@lists.ubuntu.com would be better anyway.

> I would like to know if the %include directive of kickstart is
> supported within kickseed , here is the process :

Yes, it is.

> %pre section import the disk partitioning scheme and the package list within 
> /tmp (/tmp/disk_profile and /tmp/pkg_profile)
> The import is done with python call :
> 
>                 python -c "import 
> urllib;urllib.urlretrieve('http://${PATH}/${DISK_PROFILE}','/tmp/disk_profile')"
>                 python -c "import 
> urllib;urllib.urlretrieve('http://${PATH}/${PKG_PROFILE}','/tmp/pkg_profile')"

You can't use python in %pre sections in Ubuntu Kickstart files, though;
it isn't available in the installation environment. Only the shell is
available. Instead, you can use the wget command to fetch files from the
network.

> /var/log/syslog indicate that pre script exited in 0 exit status

I'm surprised that there wasn't some indication in the syslog that this
failed because python doesn't exist. The "exited with error code 0"
rather than a non-zero code is a bug, obvious now that I look at it;
I'll get that fixed.

Regards,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]


-- 
Ubuntu-installer mailing list
Ubuntu-installer@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-installer

Reply via email to