In the second step, create rules to distinguish the three hardware types from one another
and to tell AutoYaST which profile to use. Use an algorithm similar to the following
to set up the rules:
1. Does the machine have an IP of 192.168.2.253? Then make it the print server.
2. Does the machine have PCMCIA hardware and feature an Intel chipset? Then
consider it an Intel laptop and install the sales department software selection.
3. If none of the above is true, consider the machine a developer workstation and install
accordingly.
Roughly sketched, this translates into a
rules.xml
file with the following content:
<?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>
<hostaddress>
<match>192.168.2.253</match>
<match_type>exact</match_type>
</hostaddress>
<result>
<profile>print.xml</profile>
<continue config:type="boolean">false</continue>
</result>
</rule>
<rule>
<haspcmcia>
<match>1</match>
<match_type>exact</match_type>
</haspcmcia>
<custom1>
<script>
if grep -i intel /proc/cpuinfo > /dev/null; then
echo -n "intel"
else
echo -n "non_intel"
fi;
</script>
<match>*</match>
<match_type>exact</match_type>
</custom1>
<result>
<profile>sales.xml</profile>
<continue config:type="boolean">false</continue>
</result>
Automated Installation
301
Содержание LINUX ENTERPRISE SERVER 11 - DEPLOYMENT
Страница 1: ...SUSE Linux Enterprise Server www novell com 11 March 23 2009 Deployment Guide...
Страница 8: ......
Страница 17: ...Part I Architecture Specific Installation Considerations...
Страница 18: ......
Страница 50: ......
Страница 89: ...Part II Manual Deployment...
Страница 90: ......
Страница 152: ......
Страница 192: ......
Страница 200: ......
Страница 238: ......
Страница 258: ......
Страница 265: ...Part III Imaging and Creating Products...
Страница 266: ......
Страница 282: ......
Страница 294: ......
Страница 295: ...Part IV Automated Installations...
Страница 296: ......