Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
[opensuse] autoinst.xml
Is there any way to split an autoinst.xml into a part thats common to a group
of boxes, and small per-box parts that just have network settings and host name?
(besides writing a little cgi script that will look like a plain file to the
http client but which would really be a cgi that dynamically assembles a file
and cats it out)

Here's what I mean and what I tried:

I have been using autoyast for a little while with success.

But I have a lot of machines with all the same hardware, which includes a
tedious 3 partitions per drive times 8 drives per box all software raid
arrangement, and a software package list that I'm still tweaking frequently.

So I started with a manual install to get the initial autoinst.xml and since
then have been copying and hand-editing that for each new box so each box has
it's own foo.xml on my http install server, where the only thing different is
the network settings and hostname. I do want those settings to be in the
install because I'm doing remote installs and I want the box to come up
correctly on it's network after install, not be dead trying to do dhcp.

After a short while though the collection of xml files is getting hard to
manage. And now some are old and I wouldn't want to re-install those boxes with
those old settings & software list, so I have to keep re-copying my most
current base xml file to replace old preconfigured ones and re-editing the
copies to change the ip, hostname, nameserver, hosts file.

So I tried this:
http://xml.silmaril.ie/authors/includes/


Which resulted in this:

foo4.xml:
-------------------------
<?xml version="1.0"?>
<!DOCTYPE profile [<!ENTITY ix01 SYSTEM
"http://foo.com/autoyast/ix01.template.xml";>]>
<profile xmlns="http://www.suse.com/1.0/yast2ns";
xmlns:config="http://www.suse.com/1.0/configns";>
&ix01;
<host>
[...]
</host>
<networking>
[...]
</networking>
</profile>
-------------------------


foo.template.xml:
-------------------------
<add-on>
[...]
</add-on>
<bootloader>
[...]
</bootloader
[...and so on, ...]


Foo4 contains only <?xml>, <!doctype>, and
<profile><host></host><networking></networking></profile>
as shown.

Template contains all, and only, the sections missing from foo4.xml
If the template file were inserted in place of "&ix01;" into foo4.xml, then the
result should be a valid autoinst.xml file.


When yast tries to load foo4.xml it says:

The XML parser reported an error while parsing the autoyast profile. The error
Namespace prefix config for type on add_on_products is not defined
Namespace prefix config for type on initrd_modules is not defined
Namespace prefix config for type on sections is not defined
Namespace prefix config for type on enable_firewall is not defined
...and so on,



I know the stuff in the two component files is good, because when I take
foo4.xml and insert the contents of ix01.template.xml in place of "&ix01;" and
remove the ENTITY section from <!doctype> , the resulting foo4.xml file works
perfect.

Since I don't need or want any other per-box customization beside hosnames and
net setings, Am I maybe working too hard? Is there maybe some other trick just
for that case, like leaving the network settings out of the xml entirely and
yast will fill in settings based on the kernel append parameters passed via the
boot loader?

--
Brian K. White brian@xxxxxxxxx http://www.myspace.com/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups