Files
warewulf/overlays/wwinit/etc/systemd/system/ww4-disks.target.ww
Christian Goll d96c55022d Use systemd mount units for mounting ignition
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00

20 lines
681 B
Plaintext

# This file is autogenerated by warewulf
# Host: {{.BuildHost}}
# Time: {{.BuildTime}}
# Source: {{.BuildSource}}
[Unit]
Description=mount ww4 disks
# make sure that the disks are available
Requires=ignition-ww4-disks.service
After=ignition-ww4-disks.service
Prequisite=ignition-ww4-disks.service
# Get the mounts
{{- range $fsdevice,$fs := .FileSystems }}
{{- $prefix := $fsdevice }}{{ $suffix := "mount" }}
{{- if eq $fs.Format "swap"}}
{{- $prefix = tr $fsdevice "/dev/disk/by-partlabel/" "dev-disk-by\\x2dpartlabel-"}}{{ $suffix = "swap"}}
{{- else }}
{{- if $fs.Path }}{{ $prefix = tr $fs.Path "/" "" }}{{ end }}
{{- end }}
Wants={{ print $prefix "." $suffix }}
{{- end }}