Make distribution name unique
This commit is contained in:
parent
b644b0f74c
commit
14dc6e5c28
1 changed files with 2 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue