wsl: install.cmd: tidy

This commit is contained in:
Alan Faubert 2021-01-12 17:50:23 -05:00
parent 501965f5fb
commit 54fd0e19ca

View File

@ -4,8 +4,5 @@ echo Arguments: ^<filesystem.tar.gz^> ^<destination directory^> ^<distribution n
exit /b 1
:run
wsl.exe --import %~3 "%~2" "%~1" --version 2
wsl.exe --distribution %~3 adduser %~4
wsl.exe --distribution %~3 adduser %~4 sudo
wsl.exe --distribution %~3 echo $'[automount]\n\toptions = metadata\n[network]\n\tgenerateHosts = false\n\tgenerateResolvConf = false\n[user]\n\tdefault = %~4' ^> /etc/wsl.conf
wsl.exe --distribution %~3 chmod 644 /etc/wsl.conf
wsl.exe -d %~3 -- adduser %~4; adduser %~4 sudo; echo $'[automount]\n\toptions = metadata\n[network]\n\tgenerateHosts = false\n\tgenerateResolvConf = false\n[user]\n\tdefault = %~4' ^> /etc/wsl.conf; chmod 644 /etc/wsl.conf
wsl.exe --terminate %~3