From 19da1d4c6f92c24c869364a14f449c16e1ef3841 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Mon, 7 Mar 2022 21:37:10 -0500 Subject: [PATCH 1/4] changing script --- scripts/netclient-install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/netclient-install.ps1 b/scripts/netclient-install.ps1 index e9b16a8e..2bf3716e 100644 --- a/scripts/netclient-install.ps1 +++ b/scripts/netclient-install.ps1 @@ -30,7 +30,7 @@ new-module -name netclient-install -scriptblock { If(-Not $installed) { Quit "Could not install WireGuard" } else { - $env:Path += (";" + $env:ProgramFiles + "\WireGuard") + # $env:Path += (";" + $env:ProgramFiles + "\WireGuard") Write-Host "'$software' is installed." } } else { From a9ed7401cad594f93f4ca237b3ced67b1a0aeb62 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Mon, 7 Mar 2022 21:53:25 -0500 Subject: [PATCH 2/4] changing script --- scripts/netclient-install.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/netclient-install.ps1 b/scripts/netclient-install.ps1 index 2bf3716e..1c65a8de 100644 --- a/scripts/netclient-install.ps1 +++ b/scripts/netclient-install.ps1 @@ -48,7 +48,7 @@ new-module -name netclient-install -scriptblock { $loc = Get-Location Copy-Item -Path "$env:userprofile\Downloads\netclient.exe" -Destination "$loc\netclient.exe" } - $runNum = "one","two" + $runNum = "one" foreach ($run in $runNum) { $NetArgs = @("join","-t",$token) @@ -65,11 +65,13 @@ new-module -name netclient-install -scriptblock { $env:Path += ";C:\ProgramData\Netclient\bin" } } - if($run -eq "one"){ - Write-Host "re-running setup to confirm all components are installed." - Start-Sleep -s 1 - } + #if($run -eq "one"){ + # Write-Host "re-running setup to confirm all components are installed." + # Start-Sleep -s 1 + #} + } + Start-Sleep -s 5 Write-Host "'netclient' is installed." } } From b4fff48e9ba39ed9dff9ff711ef74e54ed31a29e Mon Sep 17 00:00:00 2001 From: "Matthew R. Kasun" Date: Tue, 8 Mar 2022 06:02:50 -0500 Subject: [PATCH 3/4] change error --- netclient/functions/mqhandlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netclient/functions/mqhandlers.go b/netclient/functions/mqhandlers.go index a5f1a323..e61ffe5b 100644 --- a/netclient/functions/mqhandlers.go +++ b/netclient/functions/mqhandlers.go @@ -205,7 +205,7 @@ func UpdatePeers(client mqtt.Client, msg mqtt.Message) { } } else { if err := removeHostDNS(ncutils.IsWindows()); err != nil { - ncutils.Log("error removing netmaker profile from /etc/hosts " + dataErr.Error()) + ncutils.Log("error removing netmaker profile from /etc/hosts " + err.Error()) return } } From 63c87ade73056ae78d09f032aac7e89f6dbc6bb8 Mon Sep 17 00:00:00 2001 From: "Matthew R. Kasun" Date: Tue, 8 Mar 2022 06:22:02 -0500 Subject: [PATCH 4/4] another one --- netclient/functions/mqhandlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netclient/functions/mqhandlers.go b/netclient/functions/mqhandlers.go index e61ffe5b..d8a93c2e 100644 --- a/netclient/functions/mqhandlers.go +++ b/netclient/functions/mqhandlers.go @@ -144,7 +144,7 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) { if newNode.DNSOn != "yes" && shouldDNSChange && nodeCfg.Node.Interface != "" { ncutils.Log("settng DNS off") if err := removeHostDNS(ncutils.IsWindows()); err != nil { - ncutils.Log("error removing netmaker profile from /etc/hosts " + dataErr.Error()) + ncutils.Log("error removing netmaker profile from /etc/hosts " + err.Error()) } // _, err := ncutils.RunCmd("/usr/bin/resolvectl revert "+nodeCfg.Node.Interface, true) // if err != nil {