On Thursday 07 October 2004 22:25, Jesse Keating wrote:
I have a need to include external xml stubs in my control xml. Ideally, these stubs will be generated during a pre-script, and later included for things like disk partitioning, package selection, X configuration, stuff like that.
Basically I'm a Kickstart admin, and I've written a python script that examines a system and some install time arguments and generates the above things on the fly according to our internal formulas. I need to replicate this system for SUSE installs using autoyast. Is this possible?
Yes. Use a different <profile> tag: ----8<----8<----8<---- <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns" xmlns:xinclude="http://www.w3.org/2001/XInclude"> <configure> <scripts> <post-scripts config:type="list"> <xinclude:include href="http://10.0.0.2/pub/suse/profiles/inc.10.0.0/mk-root-mc-ini.sh.xml" /> </post-scripts> </scripts> </configure> </profile> ---->8---->8---->8---- Here's an example of an include file: ----8<----8<----8<---- <script> <filename>mk-root-mc-ini.sh</filename> <interpreter>shell</interpreter> <source> <![CDATA[ mkdir -p /root/.mc && cat > /root/.mc/ini <<EOF [Midnight-Commander] navigate_with_arrows=1 [New Left Panel] list_mode=user user_format=half type,name,|,size,|,mtime,|,perm,|,owner,|,group [New Right Panel] list_mode=user user_format=half type,name,|,size,|,mtime,|,perm,|,owner,|,group EOF cp -a /root/.mc /etc/skel/ ]]> </source> </script> ---->8---->8---->8---- 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. Cheers, Leen