Re: [suse-autoinstall] rules.xml and <memsize> parameter
I do want default.xml to match all the time, that is done on purpose. It contains all of my default settings. The others match on specific things like memory amounts and disk size. The rules.xml is actually just a test case I ran. My real rules file is much larger. Thx, Renny Michael Marion wrote:
On 13 Sep, Reynold L Demarco wrote:
I've read the other replies, but I think your logic is backwards anyway.
The rules and xml files are done in order, IME, and so you'll get default.xml every time even if the other rules are matched or not, and the result is an accumulation of all the files that match. I use this to match a site value for site specific software/scripts and disk sizes for partitioning.
I think you need to change your rules so that the default one is the last one so only things that never match above will even try it, and set the other rules to continue=false so that they don't keep trying to match each other value.. and check from higher values to lower, or you'll match the first one that's valid.
Then there's the problem of the nested rules the other reply mentioned but that's another issue.
So I'd redo the rules as:
<?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> <disksize> <match>/dev/cciss/c0d0 1000</match> <match_type>greater</match_type> </disksize> <memsize> <match>5000</match> <match_type>greater</match_type> </memsize> <result> <profile>cciss6g.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> <rule> <disksize> <match>/dev/cciss/c0d0 1000</match> <match_type>greater</match_type> </disksize> <memsize> <match>3000</match> <match_type>greater</match_type> </memsize> <result> <profile>cciss4g.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> <rule> <disksize> <match>/dev/cciss/c0d0 1000</match> <match_type>greater</match_type> </disksize> <result> <profile>cciss.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> <rule> <memsize> <match>128</match> <match_type>greater</match_type> </memsize> <result> <profile>default.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> </rules> </autoinstall>
Not sure if the cciss.xml one should continue or not.
I'd suggest doing like I did and breaking up the memory and disk sizes to completely different rules and xml files anyway.
participants (1)
-
Reynold L Demarco