28 lines
876 B
Plaintext
28 lines
876 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
|
|
Requisite=ignition-ww4-disks.service
|
|
# Get the mounts
|
|
{{- range $fsdevice,$fs := .FileSystems }}
|
|
{{- $prefix := $fsdevice }}
|
|
{{- $prefix = tr $fsdevice "-" "\\x2d" }}
|
|
{{- $prefix = tr $prefix "/" "-" }}
|
|
{{- $prefix = slice $prefix 1 }}{{ $suffix := "mount" }}
|
|
{{- if eq $fs.Format "swap"}}
|
|
{{- $prefix = tr $fsdevice "/dev/disk/by-partlabel/" "dev-disk-by\\x2dpartlabel-"}}{{ $suffix = "swap"}}
|
|
{{- else }}
|
|
{{- if ne $fs.Path "" }}
|
|
{{- $prefix = tr $fs.Path "-" "\\x2d" }}
|
|
{{- $prefix = tr $prefix "/" "-" }}
|
|
{{- $prefix = slice $prefix 1 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
Wants={{ print $prefix "." $suffix }}
|
|
{{- end }}
|