Fix newline handling in file, softlink, and ImportLink template functions
Use state-based routing instead of sentinel strings, so whitespace-trimming
syntax (e.g. `{{- file "name" -}}`) correctly creates all named files and
symlinks.
Fixes: #2118
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
Co-authored-by: Christian Goll <cgoll@suse.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -59,7 +59,6 @@ func Test_systemdNetworkOverlay(t *testing.T) {
|
||||
const expected_log_with_hwaddr string = `backupFile: true
|
||||
writeFile: true
|
||||
Filename: 10-ww4-networkd-default.network
|
||||
|
||||
# This file is autogenerated by warewulf
|
||||
[Match]
|
||||
Name=wwnet0
|
||||
@@ -104,7 +103,6 @@ DUIDType=link-layer
|
||||
const expected_log_without_hwaddr string = `backupFile: true
|
||||
writeFile: true
|
||||
Filename: 10-ww4-networkd-default.network
|
||||
|
||||
# This file is autogenerated by warewulf
|
||||
[Match]
|
||||
Name=wwnet0
|
||||
|
||||
Reference in New Issue
Block a user