1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

incus-agent: Skip /dev/incus on Windows

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-05-09 18:30:55 -04:00
parent 7c15363264
commit a0984bcabb
3 changed files with 10 additions and 0 deletions

View File

@@ -111,6 +111,10 @@ func api10Put(d *Daemon, r *http.Request) response.Response {
}
func startDevIncusServer(d *Daemon) error {
if !osGuestAPISupport {
return nil
}
d.DevIncusMu.Lock()
defer d.DevIncusMu.Unlock()
@@ -148,6 +152,10 @@ func startDevIncusServer(d *Daemon) error {
}
func stopDevIncusServer(d *Daemon) error {
if !osGuestAPISupport {
return nil
}
d.DevIncusMu.Lock()
d.DevIncusRunning = false
d.DevIncusMu.Unlock()

View File

@@ -49,6 +49,7 @@ var (
osExitStatus = linux.ExitStatus
osBaseWorkingDirectory = "/"
osMetricsSupported = true
osGuestAPISupport = true
)
func osGetEnvironment() (*api.ServerEnvironment, error) {

View File

@@ -26,6 +26,7 @@ var (
osShutdownSignal = os.Interrupt
osBaseWorkingDirectory = "C:\\"
osMetricsSupported = false
osGuestAPISupport = false
)
func osGetEnvironment() (*api.ServerEnvironment, error) {