wsl2-boot
wsl2-boot copied to clipboard
Boot script fails when $dnsIP is empty (VPN disabled)
Hello,
Situation: VPN disabled
Log:
Booting Ubuntu-20.04 distribution with WslSubnetPrefix 192.168.50, WslHostIP 192.168.50.2 ...
/boot/wsl-boot.sh: Option -n needs a parameter
Syntax: /boot/wsl-boot.sh [-h|options]
options:
-p WslSubnetPrefix
-g GatewayIP
-i WslHostIP
-n DnsServer
-s DnsSearch
-m NlMtuSize
wsl-boot completed !
Press any key to continue . . .
In line https://github.com/ocroz/wsl2-boot/blob/master/windows/wsl-boot.ps1#L99 $dnsIp is expected to further pass it to /boot/wsl-boot.sh.
The /boot/wsl-boot.sh script complains as the value is empty.
In line https://github.com/ocroz/wsl2-boot/blob/master/windows/VpnEx.ps1#L49 $dnsIP should get the value from $GatewayIP:
wsl $d $distribution --list --running >$null; if ($?) { $dnsIP = $GatewayIP }
This never happens.
Output of the wsl -d Ubuntu-20.04 --list --running > $null command:
Windows Subsystem for Linux Distributions: Ubuntu-20.04 (Default)
Hi, I'm sorry I have not considered your issue. I think I made a change that fixed the issue you described. Do you confirm this problem is gone?
Closing as no feedback.