Skip to content

Commit 52d2bb0

Browse files
committed
Automated developer guide update
1 parent 01e55ee commit 52d2bb0

File tree

1 file changed

+63
-13
lines changed

1 file changed

+63
-13
lines changed

docs/developer-guide/02-projects/osbuild/modules/stages/org.osbuild.systemd.unit.create.md

+63-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

22
# org.osbuild.systemd.unit.create
33

4-
**Create Systemd services unit file**
4+
**Create a Systemd unit file**
55

6-
This stage allows to create Systemd unit files in
7-
`/usr/lib/systemd/system/`. The `filename` property specifies the
8-
'.service' file to be added. These names are validated using the
9-
same rules as specified by systemd.unit(5) and they must contain the
10-
'.service' suffix (other types of unit files are not supported).
11-
'unit-type' determines if the unit file is created at global or
12-
system level,'unit-path' will determine the systemd unit load path.
6+
This stage allows to create Systemd unit files. The `filename` property
7+
specifies the, '.service' or '.mount' file to be added. These names are
8+
validated using the, same rules as specified by systemd.unit(5) and they
9+
must contain the, '.service' or '.mount' suffix (other types of unit files
10+
are not supported). 'unit-type' determines if the unit file is created at
11+
'global' (user) or 'system' paths,'unit-path' will determine the systemd
12+
unit load path.
1313

1414
The Unit configuration can currently specify the following subset
1515
of options:
@@ -30,6 +30,11 @@ of options:
3030
- 'ExecStart' - \[string\]
3131
- 'Environment' - \[object\]
3232
- 'EnvironmentFile' - \[string\]
33+
- 'Mount' section
34+
- 'What' - string
35+
- 'Where' - string
36+
- 'Type' - string
37+
- 'Options' - string
3338
- 'Install' section
3439
- 'WantedBy' - \[string\]
3540
- 'RequiredBy' - \[string\]
@@ -46,7 +51,7 @@ of options:
4651
"properties": {
4752
"filename": {
4853
"type": "string",
49-
"pattern": "^[\\w:.\\\\-]+[@]{0,1}[\\w:.\\\\-]*\\.service$"
54+
"pattern": "^[\\w:.\\\\-]+[@]{0,1}[\\w:.\\\\-]*\\.(service|mount)$"
5055
},
5156
"unit-type": {
5257
"type": "string",
@@ -69,10 +74,29 @@ of options:
6974
"config": {
7075
"additionalProperties": false,
7176
"type": "object",
72-
"required": [
73-
"Unit",
74-
"Service",
75-
"Install"
77+
"oneOf": [
78+
{
79+
"required": [
80+
"Unit",
81+
"Service",
82+
"Install"
83+
],
84+
"not": {
85+
"required": [
86+
"Mount"
87+
]
88+
}
89+
},
90+
{
91+
"required": [
92+
"Mount"
93+
],
94+
"not": {
95+
"required": [
96+
"Service"
97+
]
98+
}
99+
}
76100
],
77101
"description": "Configuration for a '.service' unit.",
78102
"properties": {
@@ -191,6 +215,32 @@ of options:
191215
}
192216
}
193217
},
218+
"Mount": {
219+
"additionalProperties": false,
220+
"type": "object",
221+
"description": "'Mount' configuration section of a unit file.",
222+
"required": [
223+
"What"
224+
],
225+
"properties": {
226+
"What": {
227+
"description": "Absolute path to device node",
228+
"type": "string"
229+
},
230+
"Where": {
231+
"description": "Absolute path for a file or directory for the mountpoint",
232+
"type": "string"
233+
},
234+
"Type": {
235+
"descriptions": "File system type",
236+
"type": "string"
237+
},
238+
"Options": {
239+
"descriptions": "Mount options to use when mounting",
240+
"type": "string"
241+
}
242+
}
243+
},
194244
"Install": {
195245
"additionalProperties": false,
196246
"type": "object",

0 commit comments

Comments
 (0)