Jesse Keating wrote:
On Friday 08 October 2004 04:35, Leendert Meyer wrote:
NOTE: There is a catch. If you edit the xml file, autoyast automatically includes the include file. If you subsequently save the xms file, then the line with <xinclude:include ...> is *replaced* with the actual contents of the include file.
Thats pretty close to what I need. Let me try and clarify.
I need to run a script in <pre-scripts>. This script could be external, probably should for sanity sake. This script will examine parts of the system using the Linux environment (and maybe some python source files from anaconda) and based up on that dump out to the ramdisk some files (which can be xml formatted for autoyast compatibility). I wish to INCLUDE these files further down for information such as disk formatting/partitioning, package selection, Xconfiguration, runlevel config, etc... This would allow me to have ONE control file that will generate dynamic information each time it is used for each type of system I use it against. Again, this works in kickstart, will it work in autoyast?
I think the main questions are:
A) When SUSE starts autoyast and reads the control file, does it include all files at exactly that time, BEFORE running any <pre-scripts> ?
Right.
B) If I can run scripts before all the inclusion, can I include files that are written to the local ramdisk?
There is a feature to do just that, that I never tested or documented, you can try it :-) After the file has been parsed, it is always copied to /tmp/profile/autoinst.xml This file can be used as the basis for manipulation. It would have all classes and results from rules, additionaly it will have any external includes. After the pre scripts are executed, autoyast looks for the file: /tmp/profile/modified.xml This file can be put there by the some script. If the file exists, it will be read and used for further processing. I guess this is what you want, right? Anas