Additional overlays to support provision-to-disk without ignition
- 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>
This commit is contained in:
19
overlays/systemd.swap/rootfs/etc/systemd/system/disk.swap.ww
Normal file
19
overlays/systemd.swap/rootfs/etc/systemd/system/disk.swap.ww
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $abort := true }}
|
||||
{{- range $fs := .ThisNode.FileSystemList }}
|
||||
{{- if eq $fs.Format "swap" }}
|
||||
{{- $abort = false }}
|
||||
{{ file (print ($fs.Id | SystemdEscapePath) ".swap") }}
|
||||
|
||||
[Unit]
|
||||
Before=swap.target
|
||||
|
||||
[Swap]
|
||||
What={{ $fs.Id }}
|
||||
|
||||
[Install]
|
||||
RequiredBy=swap.target
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $abort }}
|
||||
{{ abort }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,11 @@
|
||||
{{- $abort := true }}
|
||||
{{- range $fs := .ThisNode.FileSystemList }}
|
||||
{{- if eq $fs.Format "swap" }}
|
||||
{{- $abort = false }}
|
||||
{{ file (print ($fs.Id | SystemdEscapePath) ".swap") }}
|
||||
{{ softlink (print "/etc/systemd/system/" ($fs.Id | SystemdEscapePath) ".swap") }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $abort }}
|
||||
{{ abort }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user