Hi.... I was just wondering if someone could tell me if it is possible to have something like the following for a rules.xml file: <?xml version="1.0"?> <!DOCTYPE autoinstall SYSTEM "/usr/share/autoinstall/dtd/rules.dtd"> <autoinstall xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <rules config:type="list"> <rule> <custom1> <script><![CDATA[ #!/bin/sh wget -q -O /tmp/dynamic.xml http://autoyast/cgi-bin/ay_gen.pl?hostname=${hostname}\&hostnetmask=${Netmask}\&hostdefaultgw=${Gateway}\&hostdomain=${Domain}\&hostdisk1=${Disks}\&hostdisk2= echo -n "modified" ]]></script> <match>*</match> <match_type>exact</match_type> </custom1> <result> <profile>/tmp/dynamic.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> </rules> </autoinstall> Specifically I am retrieving the rules.xml file via http as part of an autoyast suse install and I want to use wget in the rules.xml file to retrieve a dynamic control file which I save in /tmp/dynamic.xml and then in the <result><profile> section I would like my rules.xml file to point at this local file. The wget works and does download the file correctly, but the <profile> section doesn't seem to let me refer to a local file.....it keeps trying to wget the file from the same URL where the rules/rules.xml file resides. I have tried just specifying /tmp/dynamic.xml (as shown above) and also file:///tmp/dynamic.xml but neither of these work. Is there any way I can get this to work? Thanx in advance. Chris Bradshaw.
On Friday 13 January 2006 16:27, Chris Bradshaw wrote:
Is there any way I can get this to work?
try to use a pre-script instead of rules. Use the same script like in the custom rule but store the fetched profile in /tmp/profile/modified.xml -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
Hi.... That was what I originally was doing....however, the /tmp/profile/modified.xml doesn't quite work for me. Not only are my SuSE config settings dynamically generated (this does work with modified.xml) but also my post and chroot scripts which I want to run after the OS installs.....it seems that the scripts are read/generated from the 'first pass' when /tmp/profile/autoinstall.xml is generated. The only way I could think of generating everything dynamically was via a rule script. So back to my original question......can I reference a local .xml file from the rules.xml file? Thanx in advance. Chris Bradshaw. On 16/01/06, Uwe Gansert <ug@suse.de> wrote:
On Friday 13 January 2006 16:27, Chris Bradshaw wrote:
Is there any way I can get this to work?
try to use a pre-script instead of rules. Use the same script like in the custom rule but store the fetched profile in /tmp/profile/modified.xml
-- ciao, Uwe Gansert
Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
-- To unsubscribe, e-mail: suse-autoinstall-unsubscribe@suse.com For additional commands, e-mail: suse-autoinstall-help@suse.com
On Monday 16 January 2006 10:38, Chris Bradshaw wrote:
So back to my original question......can I reference a local .xml file from the rules.xml file?
no, that's not possible. Can't you create the profile on the webserver on the fly? So that the "wget" is nothing more than a way to tell the webserver which profile to create and Autoyast will fetch that then. But I'll take a look at the problem you hit by using a pre-script and will try to fix that for the future. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
Hi.... Thanx for this. I had already considered creating the profile on the server, and specifying that in the rules.xml <result> section. I have since tried it and it does work, but I would have preferred it the other way. I would just prefer not to create files on the webserver (at least not on the fly). Also, (as I am sure you are tired of hearing ;-) RH/FC kickstart does it the other way.....I had started with a kickstart setup, and was hoping to create an autoyast setup as similar as possible to the kickstart setup. Anyway, it works fine creating the profile on the server, but if you do decide to update autoyast to allow the complete profile to be dynamically generated (including scripts) that would be great. Thanx for your help. Chris. On 16/01/06, Uwe Gansert <ug@suse.de> wrote:
On Monday 16 January 2006 10:38, Chris Bradshaw wrote:
So back to my original question......can I reference a local .xml file from the rules.xml file?
no, that's not possible. Can't you create the profile on the webserver on the fly? So that the "wget" is nothing more than a way to tell the webserver which profile to create and Autoyast will fetch that then.
But I'll take a look at the problem you hit by using a pre-script and will try to fix that for the future.
-- ciao, Uwe Gansert
Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
-- To unsubscribe, e-mail: suse-autoinstall-unsubscribe@suse.com For additional commands, e-mail: suse-autoinstall-help@suse.com
On Monday 16 January 2006 16:43, Chris Bradshaw wrote:
Anyway, it works fine creating the profile on the server, but if you do decide to update autoyast to allow the complete profile to be dynamically generated (including scripts) that would be great.
I've implemented it after I read your mail but I have not tested it until now. So with SUSE Linux 10.1 / SLES10 you can change the scripts section with a pre-script (except for the pre-script itself). -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
Great....how do I get access to the update? Chris. On 16/01/06, Uwe Gansert <ug@suse.de> wrote:
On Monday 16 January 2006 16:43, Chris Bradshaw wrote:
Anyway, it works fine creating the profile on the server, but if you do decide to update autoyast to allow the complete profile to be dynamically generated (including scripts) that would be great.
I've implemented it after I read your mail but I have not tested it until now. So with SUSE Linux 10.1 / SLES10 you can change the scripts section with a pre-script (except for the pre-script itself).
-- ciao, Uwe Gansert
Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
-- To unsubscribe, e-mail: suse-autoinstall-unsubscribe@suse.com For additional commands, e-mail: suse-autoinstall-help@suse.com
On Monday 16 January 2006 17:32, Chris Bradshaw wrote:
Great....how do I get access to the update?
you have to wait for beta2 of SUSE Linux 10.1 The fix did not make it into beta1 which will be out in a few days. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
participants (2)
-
Chris Bradshaw
-
Uwe Gansert