Skip to content

Commit

Permalink
modules: misc: Don't ignore the router setting
Browse files Browse the repository at this point in the history
This mistake caused us to ignore the router setting when we wanted it!
Woops =D
  • Loading branch information
purpleidea committed Dec 3, 2024
1 parent 4d30772 commit 5764c97
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/misc/main.mcl
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ class network_manager_static($st) {
[connection]
id=${dev}
{{ if .uuid -}}
uuid=${uuid}
uuid={{ .uuid }}
{{ end -}}
type=ethernet
interface-name=${dev}
autoconnect=true

[ipv4]
{{ if .router -}}
address1=${ip}/${prefix},${router}
address1=${ip}/${prefix},{{ .router }}
{{ else -}}
address1=${ip}/${prefix}
{{ end -}}
Expand All @@ -125,12 +125,14 @@ method=manual

[ethernet]
{{ if .mac -}}
mac-address=${mac}
mac-address={{ .mac }}
{{ end -}}
"

$args = struct{
uuid => $uuid,
mac => $mac,
router => $router,
}

file "/etc/NetworkManager/system-connections/${dev}.nmconnection" {
Expand Down

0 comments on commit 5764c97

Please sign in to comment.