Make mounting into sub-directoies work fixes #1073
This commit is contained in:
committed by
Christian Goll
parent
ea8e4680bc
commit
f17ba7c62b
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
has a container these binaries are extracted from the container image.
|
||||
|
||||
### Fixed
|
||||
- Make mounting of local patitions into sub-directories work
|
||||
- Make Variables.mk consistent with spec file w.r.t. WWPROVISIONDIR, e.g.
|
||||
instead of basing in `/srv`, handle it the same as chroots and overlays.
|
||||
- Enable spec file to work with Fedora
|
||||
|
||||
@@ -10,11 +10,18 @@ After=ignition-ww4-disks.service
|
||||
Requisite=ignition-ww4-disks.service
|
||||
# Get the mounts
|
||||
{{- range $fsdevice,$fs := .FileSystems }}
|
||||
{{- $prefix := $fsdevice }}{{ $suffix := "mount" }}
|
||||
{{- $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 $fs.Path }}{{ $prefix = tr $fs.Path "/" "" }}{{ end }}
|
||||
{{- if ne $fs.Path "" }}
|
||||
{{- $prefix = tr $fs.Path "-" "\\x2d" }}
|
||||
{{- $prefix = tr $prefix "/" "-" }}
|
||||
{{- $prefix = slice $prefix 1 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Wants={{ print $prefix "." $suffix }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
{{- $time := .BuildTime }}
|
||||
{{- $source := .BuildSource }}
|
||||
{{- range $fsdevice,$fs := .FileSystems }}
|
||||
{{- $prefix := tr $fs.Path "/" "" }}{{ $suffix:="mount"}}
|
||||
{{- $prefix := tr $fs.Path "-" "\\x2d" }}
|
||||
{{- $prefix = tr $prefix "/" "-" }}
|
||||
{{- $prefix = slice $prefix 1 }}
|
||||
{{ $suffix := "mount"}}
|
||||
{{- if $fs.Label }}{{ $prefix = $fs.Label }}{{ end }}
|
||||
{{- if eq $fs.Format "swap"}}{{ $prefix = tr $fsdevice "/dev/disk/by-partlabel/" "dev-disk-by\\x2dpartlabel-"}}{{ $suffix = "swap"}}{{ end }}
|
||||
{{- $filename := print $prefix "." $suffix }}
|
||||
|
||||
Reference in New Issue
Block a user