modules: misc: Don't ignore the router setting

This mistake caused us to ignore the router setting when we wanted it!
Woops =D
This commit is contained in:
James Shubin
2024-12-03 00:43:32 -05:00
parent 4d30772b3b
commit 5764c977f1

View File

@@ -106,7 +106,7 @@ class network_manager_static($st) {
[connection] [connection]
id=${dev} id=${dev}
{{ if .uuid -}} {{ if .uuid -}}
uuid=${uuid} uuid={{ .uuid }}
{{ end -}} {{ end -}}
type=ethernet type=ethernet
interface-name=${dev} interface-name=${dev}
@@ -114,7 +114,7 @@ autoconnect=true
[ipv4] [ipv4]
{{ if .router -}} {{ if .router -}}
address1=${ip}/${prefix},${router} address1=${ip}/${prefix},{{ .router }}
{{ else -}} {{ else -}}
address1=${ip}/${prefix} address1=${ip}/${prefix}
{{ end -}} {{ end -}}
@@ -125,12 +125,14 @@ method=manual
[ethernet] [ethernet]
{{ if .mac -}} {{ if .mac -}}
mac-address=${mac} mac-address={{ .mac }}
{{ end -}} {{ end -}}
" "
$args = struct{ $args = struct{
uuid => $uuid, uuid => $uuid,
mac => $mac,
router => $router,
} }
file "/etc/NetworkManager/system-connections/${dev}.nmconnection" { file "/etc/NetworkManager/system-connections/${dev}.nmconnection" {