This feature is only available since SUSE Linux 10.1 and SLES10.
You have the option to let the user decide the values of specific parts of the profile during the installation. If you use that feature, a popup will come up during the installation and will ask the user to enter a specific part of the profile. So if you want a full auto installation but you want the user to set the password of the local account, you can do this via the ask directive in the profile.
The following elements must be between the <ask-list config:type="list"><ask> ... </ask></ask-list> tags in the <general> section.
Table 4.9. XML representation
Element | Description | Comment |
---|---|---|
question | The question you want to ask the user.
<question>Enter the LDAP server</question> | The default value is the path to the element (the path often looks strange, so I recommend to enter a question) |
default | you can set a pre-selection for the user. A textentry will be filled out with this value,
a checkbox will be "true" or "false" and a selection will have this default "value" pre-selected.
<default>dc=suse,dc=de</default> | optional |
help | An optional helptext that is shown on the left side of the question.
<help>Enter the LDAP server address.</help> | optional |
title | An optional title that is shown above the question.
<title>LDAP server</title> | optional |
type | the type of the element you want to change. Possible values are "symbol","boolean","string" and "integer".
The filesystem in
the partition section is a symbol, while the "encrypted" element in the user configuration is a boolean.
You can see the type of that element if you look in your profile at the config:type="...." attribute.
<type>symbol</type> | optional. The defaul is string. If type is "symbol" you must provide the selection element too (see below) |
password | if this boolean is set to "true", a password dialog pops up instead of a simple text entry. Setting this
to "true" makes only sense if "type" is string.
<password config:type="boolean">true</password> | optional. The default is "false" |
path | The path to the element in the profile. It's a comma seperated list of elements that describes the
path to the element you want to change. For example, the ldap server element can be found in the profile
in the <ldap><ldap_server> section. So if you want to change that value, you have to set the
path to "ldap,ldap_server". If you want to change the password of the first user in the profile, you have to
set the path to "users,0,user_password". The "0" indicates the first user in the <users config:type="list">
list of users in the profile. The path can never end with a number (that's not a restriction, it can't be
a number if you think about it).
<path>networking,dns,hostname</path> | this information is optional but you should at least provie path or file |
file (available since SLES10 SP1 and SL 10.2) | you can store the answer to a question in a file, to use it in one of your scripts later.
<file>/tmp/answer_hostname</file> | this information is optional but you should at least provie path or file |
password | if this boolean is set to "true", a password dialog pops up instead of a simple text entry. Setting this
to "true" makes only sense if "type" is string.
<password config:type="boolean">true</password> | optional. The default is "false" |
stage | stage configures the installation stage where the question pops up. You can set this value to "cont" or
"initial". "initial" means the popup comes up very early in the installation, short after the pre-script
has run. "cont" means, that the dialog with the question comes after the first reboot, when the system
boots for the very first time. Questions you answer during the "inital" stage, will write their answer
into the profile on the harddisk. You should know that if you enter cleartext passwords during "initial".
Of course it does not make sense to ask for a filesystem to use in the "cont" phase. The harddisk is already
partitioned at that stage and the question will have no effect.
<stage>cont</stage> | optional. The default is "initial" |
selection | the selection element contains a list of <entry> elements. Each entry represents a possible option
for the user to choose. So the user can't enter a value in a textfield, but he can choose from a list
of values.
<selection config:type="list"> <entry> <value> reiser </value> <label> Reiser Filesystem </label> </entry> <entry> <value> ext3 </value> <label> Extended3 Filesystem </label> </entry> </selection> | optional for type=string, not possible for type=boolean and a must have for type=symbol |
Below you can see an example of the usage of the "ask" feature.
<general> <ask-list config:type="list"> <ask> <path>ldap,ldap_server</path> <stage>cont</stage> <help>choose your server depending on your department</help> <selection config:type="list"> <entry> <value>ldap1.mydom.de</value> <label>LDAP for development</label> </entry> <entry> <value>ldap2.mydom.de</value> <label>LDAP for sales</label> </entry> </selection> <default>ldap2.mydom.de</default> </ask> <ask> <path>networking,dns,hostname</path> <question>Enter Hostname</question> <stage>initial</stage> <default>enter your hostname here</default> </ask> <ask> <path>partitioning,0,partitions,0,filesystem</path> <question>Filesystem</question> <type>symbol</type> <selection config:type="list"> <entry> <value config:type="symbol">reiser</value> <label>default Filesystem (recommended)</label> </entry> <entry> <value config:type="symbol">ext3</value> <label>Fallback Filesystem</label> </entry> </selection> </ask> </ask-list> ... </general>