Make distribution name unique

This commit is contained in:
Manuel Thalmann 2024-08-24 16:41:05 +02:00
parent b644b0f74c
commit 14dc6e5c28

View file

@ -40,8 +40,8 @@ $null = New-Module {
Starts the installation loop.
#>
function Start-InstallationLoop {
$distribution = "PortValhalla";
$wslLocation = "$env:ProgramData/PortValhalla/Ubuntu";
$distribution = "ValhallaUbuntu";
$wslLocation = "$env:ProgramData/PortValhalla/$distribution";
$wslDisk = "$wslLocation/ext4.vhdx";
while (-not (Get-IsFinished)) {
@ -167,15 +167,6 @@ $null = New-Module {
Set-UserPermissions $wslLocation;
& "$wslLocation\ubuntu.exe" install --root;
wsl --shutdown;
& {
$tempDisk = New-TemporaryFile;
Move-Item $wslDisk $tempDisk;
wsl --deregister Ubuntu;
Move-Item $tempDisk $wslDisk;
wsl --import-in-place $distribution $wslDisk;
};
continue;
}