Hi Uwe, Thank you very much for the information. I have one additional question. First of all I want to explain you what I am exactly trying to do . I am trying to create a custom rule that returns the instmode value. And depending on it I want to create result files with suffixes _$instmode ( for example partitioning_hd.xml ). And I also want to have default one file ( for example partitioning.xml ) . Do you have any idea how I can put that in the rules.xml file. I thought about something like putting the partitioning.xml file in the unconditioned and after that adding the rule that looks like the one you proposed me with partitioning_@custom1@.xml . But I am not sure what happens if the result file doesn't exist. If nothing happens this will resolve my problem because the default file will be overwritten during the merge with the customized one but only if it exists. So my question is what is going on when the result file doesn't exist. Regards, Pavlin Uwe Gansert wrote:
On Friday 03 June 2005 10:58, Pavlin Maslyankov wrote:
I didn't manage to find much information about the custom rules in the autoyast file. How they have to be written?
here is a quick example that hopefully explains it a little bit. I needed it (plus some more custom rules) for a very special project where a hardware could have sda or hda devices but nothing else. This rule will fetch either "classes/sda.xml" or "classes/hda.xml" and will merge that file with all rules that follow (none in this example). I hope this helps you to understand.
<?xml version="1.0"?> <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[ if grep hda /proc/partitions > /dev/null; then echo -n "hda" else echo -n "sda" fi; ]]> </script> <match>*</match>
exact </custom1> <result> <profile>classes/@custom1@.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> </rules> </autoinstall>
"Tumbleweed E-mail Firewall