Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Guide / Supplementary Media
Applies to SUSE Linux Enterprise Server for SAP Applications 15 SP4

C Supplementary Media

Supplementary Media allow partners or customers to add their own tasks or workflows to the Installation Wizard.

This is done by adding an XML file which will be part of an AutoYaST XML file. To be included in the workflow, this file must be called product.xml.

This can be used for various types of additions, such as adding your own RPMs, running your own scripts, setting up a cluster file system or creating your own dialogs and scripts.

C.1 product.xml

The product.xml file looks like a normal AutoYaST XML file, but with some restrictions.

The restrictions exist because only the parts of the XML that are related to the second stage of the installation are run, as the first stage was executed before.

The two XML files (autoyast.xml and product.xml) will be merged after the media is read and a new AutoYaST XML file is generated on the fly for the additional workflow.

The following areas or sections will be merged:

<general>
  <ask-list>         1
  ...
<software>           2
  <post-packages>
  ...
<scripts>
  <chroot-scripts>   3
  <post-scripts>     4
  <init-scripts>     5
  ...

1

see Section C.2, “Own AutoYaST ask dialogs”

2

see Section C.3, “Installing additional packages”

3

after the package installation, before the first boot

4

during the first boot of the installed system, no services running

5

during the first boot of the installed system, all services up and running

All other sections will be replaced.

For more information about customization options, see AutoYaST Guide, Chapter Configuration and Installation Options, Section Custom User Scripts (https://documentation.suse.com/sles-15).

C.2 Own AutoYaST ask dialogs

For more information about the Ask feature of AutoYaST, see AutoYaST Guide, Chapter Configuration and Installation Options, Section Ask the User for Values During Installation (https://documentation.suse.com/sles-15).

For the Supplementary Media, you can only use dialogs within the cont stage (<stage>cont</stage>), which means they are executed after the first reboot.

Your file with the dialogs will be merged with the base AutoYaST XML file.

As a best practice, your dialog should have a dialog number and an element number, best with steps of 10. This helps to include later additions and could be used as targets for jumping over a dialog or element dependent on decisions. We also use this in our base dialogs and if you provide the right dialog number and element number, you can place your dialog between our base dialogs.

You can store the answer to a question in a file, to use it in one of your scripts later. Be aware that you must use the prefix /tmp/ay for this, because the Installation Wizard will copy such files from the /tmp directory to the directory where your media data also will be copied. This is done because the next Supplementary Media could have the same dialogs or same answer file names and would overwrite the values saved here.

Here is an example with several options:

<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns"
         xmlns:config="http://www.suse.com/1.0/configns">
<general>
  <ask-list config:type="list">
      <ask>
          <stage>cont</stage>
          <dialog config:type="integer">20</dialog>
          <element config:type="integer">10</element>
          <question>What is your name?</question>
          <default>Enter your name here</default>
          <help>Please enter your full name within the field</help>
          <file>/tmp/ay_q_my_name</file>
          <script>
             <filename>my_name.sh</filename>
             <rerun_on_error config:type="boolean">true</rerun_on_error>
             <environment config:type="boolean">true</environment>
             <source><![CDATA[
function check_name() {
           local name=$1
           LC_ALL=POSIX
           [ -z "$name" ] && echo "You need to provide a name." && return 1
           return 0
}
check_name "$VAL"
]]>
             </source>
             <debug config:type="boolean">false</debug>
             <feedback config:type="boolean">true</feedback>
          </script>
      </ask>
  </ask-list>
</general>
</profile>

C.3 Installing additional packages

You can also install RPM packages within the product.xml file. To do this, you can use the <post-packages> element for installation in stage 2.

For more information, see AutoYaST Guide, Chapter Configuration and Installation Options, Section Installing Packages in Stage 2 (https://documentation.suse.com/sles-15). An example looks as follows:

...
<software>
 <post-packages config:type="list">
  <package>yast2-cim</package>
 </post-packages>
</software>
...

C.4 Example directory for Supplementary Media

A minimal example for the Supplementary Media directory contains only a file called product.xml.