On Friday 08 October 2004 18:35, 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...
I think your goal would be served by rules. Rules allow certain decisions to be made. Martin Vidner already gave you a good pointer.
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> ?
IIRC, right after the xml control file is read, the include files are read. So the answer is yes.
B) If I can run scripts before all the inclusion,
AFAIK, you can't.
can I include files that are written to the local ramdisk?
Sorry, can't answer this question. Perhaps Anas can? ---- But, assuming you serve the xml include files from a web server, it does not matter where the include files come from. The actual content could be dynamically generated by a php script, or a perl script running on the server. Perhaps you can even pass cgi arguments to the script. Cheers, Leen