Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
M #-: Fix 'REPORT_READY'
Browse files Browse the repository at this point in the history
+ improve cleanup

Signed-off-by: Petr Ospalý <[email protected]>
  • Loading branch information
Petr Ospalý authored and Vlastimil Holer committed Jun 10, 2020
1 parent 90d5361 commit db89813
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion context.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ function reportReady()

try {

$body = 'READY = YES'
$body = 'READY=YES'
$target= $oneGateEndpoint + '/vm'

[System.Net.HttpWebRequest] $webRequest = [System.Net.WebRequest]::Create($target)
Expand Down Expand Up @@ -935,7 +935,14 @@ if(Test-Path $contextScriptPath) {
renameComputer $context
runScripts $context $contextLetter
reportReady
}

# Cleanup at the end
if ($contextDrive) {
# Eject CD with 'context.sh' if requested
ejectContextCD $contextDrive
} else {
# Delete 'context.sh' if not on CD-ROM
removeContextFile $contextScriptPath
}

Expand Down

0 comments on commit db89813

Please sign in to comment.