Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrevi committed Mar 21, 2024
1 parent e9af4a2 commit 1a0d260
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/install_ebpf.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function Start-WPRTrace
}
}

# This function specifically tests that all eBPF components can be stopped.
# This function specifically tests that all eBPF drivers and services can be stopped.
function Stop-eBPFComponents {
# First, stop user mode service, so that EbpfCore does not hang on stop.
if (Get-Service "eBPFSvc" -ErrorAction SilentlyContinue) {
Expand All @@ -135,9 +135,11 @@ function Stop-eBPFComponents {
# Stop the drivers and services.
$EbpfDrivers.GetEnumerator() | ForEach-Object {
try {
Write-Log "Stopping $($_.Key) service..." -ForegroundColor Green
Stop-Service $_.Name -ErrorAction Stop 2>&1 | Write-Log
Write-Log "$($_.Key) service stopped." -ForegroundColor Green
if ($_.Value.IsDriver) {
Write-Log "Stopping $($_.Key) service..." -ForegroundColor Green
Stop-Service $_.Name -ErrorAction Stop 2>&1 | Write-Log
Write-Log "$($_.Key) service stopped." -ForegroundColor Green
}
} catch {
throw "Failed to stop $($_.Key) service: $_"
}
Expand Down

0 comments on commit 1a0d260

Please sign in to comment.