summaryrefslogtreecommitdiff
path: root/devel/script/2_keys.xml
blob: 221180f53322b05094eeeea686c6b8c472384725 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<?xml version="1.0" encoding="utf-8"?>
<chapter label="2" id="keys">
    <title>HorizonScript Keys</title>
    <section id="key_intro">
        <title>Introduction</title>
        <para>A HorizonScript file is, at its core, a collection of values that determine the actions and configuration values used to transform a computer from an indeterminate state to a well-known state running Adélie Linux.  These values are categorised into <firstterm>key</firstterm>s, which is a logical unit of a value.</para>
        <para>This chapter defines and specifies for every valid key for a HorizonScript file: its name, its purpose, its format, and one or more example values with explanations.</para>
    </section>
    <section id="reqd_keys">
        <title>Required Keys</title>
        <para>Each key specified in this section is required to be present in a HorizonScript.  If any key from this section is missing, the HorizonScript will be considered invalid and Horizon Runner will not execute it.</para>
        <section id="network">
            <title><literal>network</literal></title>
            <formalpara id="network.name">
                <title>Name</title>
                <para><literal>network</literal></para>
            </formalpara>
            <formalpara id="network.purpose">
                <title>Purpose</title>
                <para>The <literal>network</literal> key determines if the target computer will support networking or not.  If the value is <literal>true</literal>, the computer will support networking, and at least one <literal>netaddress</literal> key will then be required.</para>
            </formalpara>
            <formalpara id="network.format">
                <title>Format</title>
                <para>The <literal>network</literal> key is a Boolean value &mdash; valid values are <literal>true</literal> and <literal>false</literal>.  <literal>network</literal> must appear exactly once in a HorizonScript.</para>
            </formalpara>
            <formalpara id="network.example">
                <title>Example</title>
                <para>
                    <example>
                        <title>The <literal>network</literal> Key</title>
                        <programlisting>
network true
                        </programlisting>
                        <para>This enables networking for the target computer.</para>
                    </example>
                </para>
            </formalpara>
        </section>
        <section id="hostname">
            <title><literal>hostname</literal></title>
            <formalpara id="hostname.name">
                <title>Name</title>
                <para><literal>hostname</literal></para>
            </formalpara>
            <formalpara id="hostname.purpose">
                <title>Purpose</title>
                <para>The <literal>hostname</literal> key determines the hostname of the target computer.  This key is always required, even when the target computer will not participate in a network.  The computer's hostname is used on shell prompts, most window manager launchers, and in log files.</para>
            </formalpara>
            <formalpara id="hostname.format">
                <title>Format</title>
                <para>The <literal>hostname</literal> key is a string value that must contain only alphanumeric characters and optionally one or more '.' characters.  If hostname contains one or more '.' characters, all content before the first '.' is considered the hostname, and all content after the first '.' is considered the domain name.  <literal>hostname</literal> must appear exactly once in a HorizonScript.</para>
            </formalpara>
            <formalpara id="hostname.examples">
                <title>Examples</title>
                <para>
                    <example>
                        <title>The <literal>hostname</literal> Key &mdash; Setting a Host Name</title>
                        <programlisting>
hostname gwyn
                        </programlisting>
                        <para>This sets the hostname of the target computer to <literal>gwyn</literal>.</para>
                    </example>
                    <example>
                        <title>The <literal>hostname</literal> Key &mdash; Setting a Host Name and Domain Name</title>
                        <programlisting>
hostname gwyn.foxkit.internal
                        </programlisting>
                        <para>This sets the hostname of the target computer to <literal>gwyn.foxkit.internal</literal>.</para>
                    </example>
                </para>
            </formalpara>
        </section>
    </section>
    <section id="opt_keys">
        <title>Optional Keys</title>
        <para>Each key specified in this section may be present in a HorizonScript.  This section additionally defines the default value or action taken if the specified key is not present.</para>
        <section id="language">
            <title><literal>language</literal></title>
            <formalpara id="language.name">
                <title>Name</title>
                <para><literal>language</literal></para>
            </formalpara>
            <formalpara id="language.purpose">
                <title>Purpose</title>
                <para>The <literal>language</literal> key determines the default natural language for the target computer.  The value of this key will be used to configure the <envar>LANG</envar> and <envar>LC_ALL</envar> environment variables, in addition to installing language packs for certain software.</para>
            </formalpara>
            <formalpara id="language.format">
                <title>Format</title>
                <para>The <literal>language</literal> key is a string value that specifies a valid locale code.  A locale code must match one of the following formats: <replaceable>xx</replaceable>, or <replaceable>xx</replaceable><literal>_</literal><replaceable>YY</replaceable>, or <replaceable>xx</replaceable><literal>_</literal><replaceable>YY</replaceable><literal>.UTF-8</literal>, where <replaceable>xx</replaceable> is a valid ISO 639-1 language code, and <replaceable>YY</replaceable> is a valid ISO 3166-1 country code.  <literal>language</literal> may appear at most once in a HorizonScript.</para>
            </formalpara>
            <formalpara id="language.default">
                <title>Default</title>
                <para>If the <literal>language</literal> key is not present, no setting will be defined for the <envar>LANG</envar> or <envar>LC_ALL</envar> environment variables.  Most software treats this as either "C.UTF-8" or "en_US.UTF-8".  No language packs will be installed for software that supports multiple language; due to English being the <emphasis role="italics">de facto</emphasis> language of software engineering, this implies all software will run in English.</para>
            </formalpara>
            <formalpara id="language.examples">
                <title>Examples</title>
                <para>
                    <example>
                        <title>The <literal>language</literal> Key &mdash; Simple Language</title>
                        <programlisting>
language cy
                        </programlisting>
                        <para>This sets the language of the target computer to Welsh.</para>
                    </example>
                    <example>
                        <title>The <literal>language</literal> Key &mdash; Language with Country Localisation</title>
                        <programlisting>
language fr_CA
                        </programlisting>
                        <para>This sets the language of the target computer to Canadian French.</para>
                    </example>
                </para>
            </formalpara>
        </section>
        <section id="keymap">
            <title><literal>keymap</literal></title>
            <formalpara id="keymap.name">
                <title>Name</title>
                <para><literal>keymap</literal></para>
            </formalpara>
            <formalpara id="keymap.purpose">
                <title>Purpose</title>
                <para>The <literal>keymap</literal> key determines the keyboard layout used for input on the target computer.</para>
            </formalpara>
            <formalpara id="keymap.format">
                <title>Format</title>
                <para>The <literal>keymap</literal> key is a string value that specifies the name of a keyboard layout.  Valid keyboard layouts are listed in <filename>/etc/console-setup/ckb/rules/xorg.lst</filename> under the <literal>! layout</literal> heading.  <literal>keymap</literal> may appear at most once in a HorizonScript.</para>
            </formalpara>
            <formalpara id="keymap.default">
                <title>Default</title>
                <para>If the <literal>keymap</literal> key is not present, the target computer will use the default keyboard settings from Linux.  These settings are architecture-dependent, but almost universally use a US QWERTY-style layout.</para>
            </formalpara>
            <formalpara id="keymap.example">
                <title>Example</title>
                <para>
                    <example>
                        <title>The <literal>keymap</literal> Key</title>
                        <programlisting>
keymap fr
                        </programlisting>
                        <para>This sets the keyboard layout of the target computer to French AZERTY.</para>
                    </example>
                </para>
            </formalpara>
        </section>
        <section id="firmware">
            <title><literal>firmware</literal></title>
            <formalpara id="firmware.name">
                <title>Name</title>
                <para><literal>firmware</literal></para>
            </formalpara>
            <formalpara id="firmware.purpose">
                <title>Purpose</title>
                <para>The <literal>firmware</literal> key determines if the target computer will load potentially insecure, proprietary firmware.</para>
            </formalpara>
            <formalpara id="firmware.format">
                <title>Format</title>
                <para>The <literal>firmware</literal> key is a Boolean value &mdash; valid values are <literal>true</literal> and <literal>false</literal>.  <literal>firmware</literal> may appear at most once in a HorizonScript.</para>
            </formalpara>
            <formalpara id="firmware.default">
                <title>Default</title>
                <para>If the <literal>firmware</literal> key is not present, the target computer will not load proprietary firmware.  This is to ensure the integrity, security, and reliability of the target computer.</para>
            </formalpara>
            <formalpara id="firmware.example">
                <title>Example</title>
                <para>
                    <example>
                        <title>The <literal>firmware</literal> Key</title>
                        <programlisting>
firmware false
                        </programlisting>
                        <para>This explicitly disables loading of firmware on the target computer.</para>
                    </example>
                </para>
            </formalpara>
        </section>
        <section id="netaddress">
            <title><literal>netaddress</literal></title>
            <formalpara id="netaddress.name">
                <title>Name</title>
                <para><literal>netaddress</literal></para>
            </formalpara>
            <formalpara id="netaddress.purpose">
                <title>Purpose</title>
                <para>The <literal>netaddress</literal> key determines the network configuration used on the target computer.</para>
            </formalpara>
            <formalpara id="netaddress.format">
                <title>Format</title>
                <para>The <literal>netaddress</literal> key is a space-separated list of network configuration information:
                    <orderedlist id="netaddress.format.items">
                        <listitem><para>The kernel interface name.  If the interface specified does not exist, the system will issue a soft error (logging the failure but attempting to continue with installation).</para></listitem>
                        <listitem><para>The addressing type.  Valid values are <literal>dhcp</literal> for DHCP v4 and v6, <literal>slaac</literal> for IPv6 Stateless Automatic Address Configuration, and <literal>static</literal> for Administrator-specified addressing.  The list must end here unless the address type specified is <literal>static</literal>.  Any additional items constitute a configuration error and an invalid HorizonScript.</para></listitem>
                        <listitem><para>The IP address.  The value specified must be a valid IPv4 or IPv6 address.</para></listitem>
                        <listitem><para>The prefix or network mask.  The value must be either:
                                <orderedlist id="netaddress.format.prefix_types">
                                    <listitem><para>A whole number in the range of 1-32 for IPv4 addresses, or 1-64 for IPv6 addresses.</para></listitem>
                                    <listitem><para>An IPv4 network mask, in the format <literal><replaceable>octet</replaceable>.<replaceable>octet</replaceable>.<replaceable>octet</replaceable>.<replaceable>octet</replaceable></literal>.</para></listitem>
                                </orderedlist>
                        </para></listitem>
                        <listitem><para>Optionally, the default gateway.  The value specified must be a valid IP address of the same family as the IP address specified in item 3.</para></listitem>
                    </orderedlist>
                    <literal>netaddress</literal> must not appear unless <literal>network</literal> is <literal>true</literal>.  If <literal>network</literal> is <literal>true</literal>, then <literal>netaddress</literal> must appear at least once, and may appear up to 255 times per interface.
                </para>
            </formalpara>
            <formalpara id="netaddress.default">
                <title>Default</title>
                <para>There is no default for this key.  It is invalid to enable networking and not provide at least one <literal>netaddress</literal> key.</para>
            </formalpara>
            <formalpara id="netaddress.example">
                <title>Example</title>
                <para>
                    <example>
                        <title>The <literal>netaddress</literal> Key &mdash; Simple DHCP</title>
                        <programlisting>
netaddress eth0 dhcp
                        </programlisting>
                        <para>This configures the target computer to use DHCP on interface <literal>eth0</literal>.</para>
                    </example>
                    <example>
                        <title>The <literal>netaddress</literal> Key &mdash; Static Addressing</title>
                        <programlisting>
netaddress eth0 2001:db8::1337 64 2001:db8::1
netaddress eth0 198.51.100.37 24 198.51.100.1
                        </programlisting>
                        <para>This configures the target computer to use the addresses <literal>2001:db::1337/64</literal> and <literal>198.51.100.37/24</literal> on interface <literal>eth0</literal>.  The default gateways are <literal>2001:db::1</literal> and <literal>198.51.100.1</literal>.</para>
                    </example>
                </para>
            </formalpara>
        </section>
        <section id="nameserver">
            <title><literal>nameserver</literal></title>
            <formalpara id="nameserver.name">
                <title>Name</title>
                <para><literal>nameserver</literal></para>
            </formalpara>
            <formalpara id="nameserver.purpose">
                <title>Purpose</title>
                <para>The <literal>nameserver</literal> key determines the DNS server used for name queries on the target computer.</para>
            </formalpara>
            <formalpara id="nameserver.format">
                <title>Format</title>
                <para>The <literal>nameserver</literal> key takes either an IPv4 address or IPv6 address.  Any other value is invalid.  The <literal>nameserver</literal> may appear up to four times in a HorizonScript, or be omitted.  It is valid to specify <literal>nameserver</literal> even if <literal>network</literal> is <literal>false</literal>, but name queries will not function properly without a network configuration.</para>
            </formalpara>
            <formalpara id="nameserver.default">
                <title>Default</title>
                <para>If the <literal>nameserver</literal> key is not specified, name queries requiring the DNS will not succeed on the target computer.</para>
            </formalpara>
            <formalpara id="nameserver.example">
                <title>Example</title>
                <para>
                    <example>
                        <title>The <literal>nameserver</literal> Key</title>
                        <programlisting>
nameserver 2620:fe::fe
                        </programlisting>
                        <para>This configures the target computer to use <ulink url="https://www.quad9.net/about/">Quad9</ulink>'s public resolver, <literal>2620:fe::fe</literal>, for name queries.</para>
                    </example>
                </para>
            </formalpara>
        </section>
        <section id="netssid">
            <title><literal>netssid</literal></title>
            <formalpara id="netssid.name">
                <title>Name</title>
                <para><literal>netssid</literal></para>
            </formalpara>
            <formalpara id="netssid.purpose">
                <title>Purpose</title>
                <para>The <literal>netssid</literal> key determines the wireless networking configuration on the target computer.</para>
            </formalpara>
            <formalpara id="netssid.format">
                <title>Format</title>
                <para>The <literal>netssid</literal> is a space-separated list of wireless networking configuration information:
                    <orderedlist id="netssid.format.items">
                        <listitem><para>The kernel interface name.  If the interface specified does not exist, the system will issue a soft error (logging the failure but attempting to continue with installation).</para></listitem>
                        <listitem><para>The SSID name to connect to.  This must be a string value enclosed by ASCII double-quotes (<literal>"</literal>).  System behaviour is undefined if the SSID name contains an ASCII double-quote.</para></listitem>
                        <listitem><para>The security type of the SSID.  Valid values are <literal>none</literal> for an open access point, <literal>wep</literal> for a WEP passphrase, and <literal>wpa</literal> for a WPA pre-shared key (PSK).</para></listitem>
                        <listitem><para>If the security type is not <literal>none</literal>, the passphrase or pre-shared key.  WPA PSKs may be specified in hexadecimal or as a raw string.  The remainder of the line will be used verbatim.</para></listitem>
                    </orderedlist>
                </para>
            </formalpara>
            <formalpara id="netssid.default">
                <title>Default</title>
                <para>If the <literal>netssid</literal> key is not specified, no wireless network configuration will be present on the target computer.</para>
            </formalpara>
            <formalpara id="netssid.examples">
                <title>Examples</title>
                <para>
                    <example>
                        <title>The <literal>netssid</literal> Key &mdash; Open Network</title>
                        <programlisting>
netssid wlan0 "Insecure Net" none
                        </programlisting>
                        <para>This configures the target computer to connect to the access point with name <literal>Insecure Net</literal>, with no security.</para>
                    </example>
                    <example>
                        <title>The <literal>netssid</literal> Key &mdash; WEP Network</title>
                        <programlisting>
netssid wlan0 "Hophop" wep omgitsarabbit
                        </programlisting>
                        <para>This configures the target computer to connect to the access point with name <literal>Hophop</literal>, and the WEP passphrase <literal>omgitsarabbit</literal>.</para>
                    </example>
                    <example>
                        <title>The <literal>netssid</literal> Key &mdash; WPA2 Network</title>
                        <programlisting>
netssid wlan0 "The New Fox 5G" wpa shh sekrit
                        </programlisting>
                        <para>This configures the target computer to connect to the access point with name <literal>The New Fox 5G</literal>, with the WPA PSK <literal>shh sekrit</literal>.</para>
                    </example>
                </para>
            </formalpara>
        </section>
    </section>
</chapter>