- sfdisk - partitions the disk - mkfs - formats partitions - mkswap - formats partitions for swap - systemd.mount - explicit creation of systemd mount units - systemd.swap - explicit creation of systemd swap units Signed-off-by: Jonathon Anderson <janderson@ciq.com>
25 lines
474 B
Plaintext
25 lines
474 B
Plaintext
{{- $abort := true }}
|
|
{{- range $fs := .ThisNode.FileSystemList }}
|
|
{{- if and $fs.Path (ne $fs.Format "swap") }}
|
|
{{- $abort = false }}
|
|
{{ file (print ($fs.Path | SystemdEscapePath) ".mount") }}
|
|
|
|
[Unit]
|
|
Before=local-fs.target
|
|
|
|
[Mount]
|
|
Where={{ $fs.Path }}
|
|
What={{ $fs.Id }}
|
|
Type={{ $fs.Format }}
|
|
{{- if $fs.MountOptions }}
|
|
Options={{ $fs.MountOptions }}
|
|
{{- end }}
|
|
|
|
[Install]
|
|
RequiredBy=local-fs.target
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $abort }}
|
|
{{ abort }}
|
|
{{- end }}
|