@samitouri / QOSAMI-WSL / commits / abd98881

Fallback to wget if curl is not available (#6479)

Blue committed Jan 27, 2021 at 17:38 UTC abd988810d660b942cc2c6502465828a4ef975f6
2 files changed +9 -2
diagnostics/networking.bat
+4
@@ -12,6 +12,10 @@ if not exist networking.sh (echo networking.sh not found && exit /b 1)
12 echo HNS objects:
13 hnsdiag list all -df
14
15 +:: Print the Windows routing table
16 +echo Routing table:
17 +netstat.exe -rn
18 +
19 :: The WSL HNS network is created once per boot. Resetting it to collect network creation logs
20 echo Deleting HNS network
21 powershell.exe -NoProfile "Get-HnsNetwork | Where-Object {$_.Name -eq 'WSL'} | Remove-HnsNetwork"
diagnostics/networking.sh
+5 -2
@@ -27,5 +27,8 @@ traceroute 1.1.1.1
27 cat /etc/resolv.conf
28
29 # Validate that everything is functionning correctly
30 -curl -m 5 -v https://microsoft.com
31 -
30 +if which curl > /dev/null; then
31 + curl -m 5 -v https://microsoft.com
32 +else
33 + wget -T 5 -v https://microsoft.com
34 +fi
\ No newline at end of file