Make distribution name unique
This commit is contained in:
parent
b644b0f74c
commit
14dc6e5c28
|
@ -40,8 +40,8 @@ $null = New-Module {
|
||||||
Starts the installation loop.
|
Starts the installation loop.
|
||||||
#>
|
#>
|
||||||
function Start-InstallationLoop {
|
function Start-InstallationLoop {
|
||||||
$distribution = "PortValhalla";
|
$distribution = "ValhallaUbuntu";
|
||||||
$wslLocation = "$env:ProgramData/PortValhalla/Ubuntu";
|
$wslLocation = "$env:ProgramData/PortValhalla/$distribution";
|
||||||
$wslDisk = "$wslLocation/ext4.vhdx";
|
$wslDisk = "$wslLocation/ext4.vhdx";
|
||||||
|
|
||||||
while (-not (Get-IsFinished)) {
|
while (-not (Get-IsFinished)) {
|
||||||
|
@ -167,15 +167,6 @@ $null = New-Module {
|
||||||
Set-UserPermissions $wslLocation;
|
Set-UserPermissions $wslLocation;
|
||||||
& "$wslLocation\ubuntu.exe" install --root;
|
& "$wslLocation\ubuntu.exe" install --root;
|
||||||
wsl --shutdown;
|
wsl --shutdown;
|
||||||
|
|
||||||
& {
|
|
||||||
$tempDisk = New-TemporaryFile;
|
|
||||||
Move-Item $wslDisk $tempDisk;
|
|
||||||
wsl --deregister Ubuntu;
|
|
||||||
Move-Item $tempDisk $wslDisk;
|
|
||||||
wsl --import-in-place $distribution $wslDisk;
|
|
||||||
};
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue