Mini Shell

Direktori : /usr/share/osinfo/install-script/opensuse.org/
Upload File :
Current File : //usr/share/osinfo/install-script/opensuse.org/opensuse-autoyast-jeos.xml

<?xml version="1.0"?>
<libosinfo version="0.0.1">
  <!-- Licensed under the GNU General Public License version 2 or later.
     See http://www.gnu.org/licenses/ for a copy of the license text -->
  <!-- JEOS PROFILE -->
  <install-script id="http://opensuse.org/opensuse/autoyast/jeos">
    <profile>jeos</profile>
    <expected-filename>autoinst.xml</expected-filename>
    <config>
      <!-- Localization options -->
      <param name="l10n-keyboard" policy="optional" value-map="http://x.org/x11-keyboard"/>
      <param name="l10n-language" policy="optional"/>
      <param name="l10n-timezone" policy="optional"/>
      <!-- Account options -->
      <param name="admin-password" policy="required"/>
      <!-- User account options -->
      <param name="user-login" policy="optional"/>
      <param name="user-password" policy="optional"/>
      <param name="user-realname" policy="optional"/>
    </config>
    <injection-method>disk</injection-method>
    <injection-method>initrd</injection-method>
    <template>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
        <xsl:template name="hostname">
          <xsl:choose>
            <xsl:when test="config/hostname != ''">
              <xsl:value-of select="config/hostname"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text>localhost</xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:template>
        <xsl:template name="l10n-language">
          <xsl:choose>
            <xsl:when test="config/l10n-language != '' and config/l10n-language != 'C'">
              <xsl:value-of select="config/l10n-language"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text>en_US</xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:template>
        <xsl:template name="l10n-keyboard">
          <xsl:choose>
            <xsl:when test="config/l10n-keyboard != '' and config/l10n-keyboard != 'C'">
              <xsl:value-of select="config/l10n-keyboard"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text>us</xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:template>
        <xsl:template name="installation-url">
          <xsl:choose>
            <xsl:when test="config/installation-url != ''">
              <xsl:value-of select="config/installation-url"/>
            </xsl:when>
            <xsl:when test="tree/url != ''">
              <xsl:value-of select="tree/url"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="repo-oss"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:template>
        <xsl:template name="repo-oss">
          <xsl:text>http://download.opensuse.org/</xsl:text>
          <xsl:if test="not(contains(os/version, 'tumbleweed'))">
            <xsl:text>distribution/leap/</xsl:text>
          </xsl:if>
          <xsl:value-of select="os/version"/>
          <xsl:text>/repo/oss/</xsl:text>
        </xsl:template>
        <xsl:template name="repo-non-oss">
          <xsl:text>http://download.opensuse.org/</xsl:text>
          <xsl:if test="not(contains(os/version, 'tumbleweed'))">
            <xsl:text>distribution/leap/</xsl:text>
          </xsl:if>
          <xsl:value-of select="os/version"/>
          <xsl:text>/repo/non-oss/</xsl:text>
        </xsl:template>
        <xsl:template name="repo-update-oss">
          <xsl:text>http://download.opensuse.org/update/</xsl:text>
          <xsl:if test="not(contains(os/version, 'tumbleweed'))">
            <xsl:text>leap/</xsl:text>
          </xsl:if>
          <xsl:value-of select="os/version"/>
          <xsl:text>/</xsl:text>
          <xsl:if test="not(contains(os/version, 'tumbleweed'))">
            <xsl:text>oss/</xsl:text>
          </xsl:if>
        </xsl:template>
        <xsl:template name="repo-update-non-oss">
          <xsl:text>http://download.opensuse.org/update/leap/</xsl:text>
          <xsl:value-of select="os/version"/>
          <xsl:text>/non-oss/</xsl:text>
        </xsl:template>
        <xsl:template match="/command-line">
          <xsl:text>autoyast=</xsl:text>
          <xsl:choose>
            <xsl:when test="script/preferred-injection-method = 'initrd'">
              <xsl:text>file:///</xsl:text>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text>device://sda/</xsl:text>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:value-of select="script/expected-filename"/>
          <xsl:if test="script/installation-source = 'network'">
            <xsl:text> install=</xsl:text>
            <xsl:call-template name="installation-url"/>
          </xsl:if>
        </xsl:template>
        <xsl:template match="/install-script-config">
          <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
            <firewall>
              <enable_firewall config:type="boolean">false</enable_firewall>
              <start_firewall config:type="boolean">false</start_firewall>
            </firewall>
            <general>
              <ask-list config:type="list"/>
              <mode>
                <confirm config:type="boolean">false</confirm>
                <second_stage config:type="boolean">false</second_stage>
                <final_reboot config:type="boolean">true</final_reboot>
              </mode>
              <proposals config:type="list"/>
              <signature-handling>
                <accept_file_without_checksum config:type="boolean">true</accept_file_without_checksum>
                <accept_non_trusted_gpg_key config:type="boolean">true</accept_non_trusted_gpg_key>
                <accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key>
                <accept_unsigned_file config:type="boolean">true</accept_unsigned_file>
                <accept_verification_failed config:type="boolean">false</accept_verification_failed>
                <import_gpg_key config:type="boolean">true</import_gpg_key>
              </signature-handling>
              <storage>
                <start_multipath config:type="boolean">false</start_multipath>
              </storage>
            </general>
            <keyboard>
              <keyboard_values>
                <delay/>
                <discaps config:type="boolean">false</discaps>
                <numlock>bios</numlock>
                <rate/>
              </keyboard_values>
              <keymap>
                <xsl:call-template name="l10n-keyboard"/>
              </keymap>
            </keyboard>
            <language>
              <language>
                <xsl:call-template name="l10n-language"/>
              </language>
            </language>
            <networking>
              <dns>
                <hostname>
                  <xsl:call-template name="hostname"/>
                </hostname>
              </dns>
            </networking>
            <report>
              <errors>
                <log config:type="boolean">true</log>
                <show config:type="boolean">true</show>
                <timeout config:type="integer">0</timeout>
              </errors>
              <messages>
                <log config:type="boolean">true</log>
                <show config:type="boolean">true</show>
                <timeout config:type="integer">10</timeout>
              </messages>
              <warnings>
                <log config:type="boolean">true</log>
                <show config:type="boolean">true</show>
                <timeout config:type="integer">10</timeout>
              </warnings>
              <yesno_messages>
                <log config:type="boolean">true</log>
                <show config:type="boolean">true</show>
                <timeout config:type="integer">10</timeout>
              </yesno_messages>
            </report>
            <scripts>
              <chroot-scripts config:type="list">
                <script>
                  <chrooted config:type="boolean">true</chrooted>
                  <source>
if test -n '<xsl:value-of select="config/user-login"/>' &amp;&amp; test -n '<xsl:value-of select="config/user-password"/>'; then
  echo '<xsl:value-of select="config/user-login"/> ALL=(ALL:ALL) ALL' &gt;&gt; /etc/sudoers
fi

# Enable default OpenSUSE repos
zypper ar -f <xsl:call-template name="installation-url"/> repo-oss
zypper ar -f <xsl:call-template name="repo-non-oss"/> repo-non-oss
zypper ar -f <xsl:call-template name="repo-update-oss"/> repo-update-oss
<xsl:if test="not(contains(os/version, 'tumbleweed'))">
  zypper ar -f <xsl:call-template name="repo-update-non-oss"/> repo-update-non-oss
</xsl:if>

# Create an osinfo-install-successful file in /root
touch /root/osinfo-install-successful
                  </source>
                </script>
              </chroot-scripts>
            </scripts>
            <services-manager>
              <default_target>multi-user</default_target>
            </services-manager>
            <software>
              <products config:type="list">
                <product>openSUSE</product>
              </products>
              <packages config:type="list">
                <package>autoyast2-installation</package>
              </packages>
              <patterns config:type="list">
                <pattern>apparmor</pattern>
                <pattern>base</pattern>
                <pattern>console</pattern>
                <pattern>enhanced_base</pattern>
                <pattern>sw_management</pattern>
                <pattern>yast2_basis</pattern>
                <!-- Those patterns are not present in Tumbleweed and Leap 15.3+ anymore -->
                <xsl:if test="not(contains(os/version, 'tumbleweed'))">
                  <xsl:if test="(os/version &lt; 15.3) or contains(os/version, 42)">
                    <pattern>apparmor_opt</pattern>
                    <pattern>enhanced_base_opt</pattern>
                  </xsl:if>
                </xsl:if>
                <!-- Those patterns are only present in Leap 42.2 and 42.3 -->
                <xsl:if test="contains(os/version, '42')">
                  <pattern>devel_basis</pattern>
                  <pattern>yast2_install_wf</pattern>
                </xsl:if>
              </patterns>
            </software>
            <timezone>
              <hwclock>UTC</hwclock>
              <timezone>
                <xsl:value-of select="config/l10n-timezone"/>
              </timezone>
            </timezone>
            <user_defaults>
              <expire/>
              <group>100</group>
              <groups/>
              <home>/home</home>
              <inactive>-1</inactive>
              <shell>/bin/bash</shell>
              <skel>/etc/skel</skel>
              <umask>022</umask>
            </user_defaults>
            <users config:type="list">
              <user>
                <encrypted config:type="boolean">false</encrypted>
                <fullname>root</fullname>
                <gid>0</gid>
                <home>/root</home>
                <shell>/bin/bash</shell>
                <uid>0</uid>
                <user_password>
                  <xsl:value-of select="config/admin-password"/>
                </user_password>
                <username>root</username>
              </user>
              <xsl:if test="config/user-login != '' and config/user-password != ''">
                <user>
                  <encrypted config:type="boolean">false</encrypted>
                  <xsl:if test="config/user-realname != ''">
                    <fullname>
                      <xsl:value-of select="config/user-realname"/>
                    </fullname>
                  </xsl:if>
                  <username>
                    <xsl:value-of select="config/user-login"/>
                  </username>
                  <user_password>
                    <xsl:value-of select="config/user-password"/>
                  </user_password>
                </user>
              </xsl:if>
            </users>
          </profile>
        </xsl:template>
      </xsl:stylesheet>
    </template>
  </install-script>
</libosinfo>

Zerion Mini Shell 1.0