1
1
2
2
# org.osbuild.systemd.unit.create
3
3
4
- ** Create Systemd services unit file**
4
+ ** Create a Systemd unit file**
5
5
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.
13
13
14
14
The Unit configuration can currently specify the following subset
15
15
of options:
@@ -30,6 +30,11 @@ of options:
30
30
- 'ExecStart' - \[ string\]
31
31
- 'Environment' - \[ object\]
32
32
- 'EnvironmentFile' - \[ string\]
33
+ - 'Mount' section
34
+ - 'What' - string
35
+ - 'Where' - string
36
+ - 'Type' - string
37
+ - 'Options' - string
33
38
- 'Install' section
34
39
- 'WantedBy' - \[ string\]
35
40
- 'RequiredBy' - \[ string\]
@@ -46,7 +51,7 @@ of options:
46
51
"properties" : {
47
52
"filename" : {
48
53
"type" : " string" ,
49
- "pattern" : " ^[\\ w:.\\\\ -]+[@]{0,1}[\\ w:.\\\\ -]*\\ .service$"
54
+ "pattern" : " ^[\\ w:.\\\\ -]+[@]{0,1}[\\ w:.\\\\ -]*\\ .( service|mount) $"
50
55
},
51
56
"unit-type" : {
52
57
"type" : " string" ,
@@ -69,10 +74,29 @@ of options:
69
74
"config" : {
70
75
"additionalProperties" : false ,
71
76
"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
+ }
76
100
],
77
101
"description" : " Configuration for a '.service' unit." ,
78
102
"properties" : {
@@ -191,6 +215,32 @@ of options:
191
215
}
192
216
}
193
217
},
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
+ },
194
244
"Install" : {
195
245
"additionalProperties" : false ,
196
246
"type" : " object" ,
0 commit comments