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:
@@ -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()
|
||||
|
||||
@@ -49,6 +49,7 @@ var (
|
||||
osExitStatus = linux.ExitStatus
|
||||
osBaseWorkingDirectory = "/"
|
||||
osMetricsSupported = true
|
||||
osGuestAPISupport = true
|
||||
)
|
||||
|
||||
func osGetEnvironment() (*api.ServerEnvironment, error) {
|
||||
|
||||
@@ -26,6 +26,7 @@ var (
|
||||
osShutdownSignal = os.Interrupt
|
||||
osBaseWorkingDirectory = "C:\\"
|
||||
osMetricsSupported = false
|
||||
osGuestAPISupport = false
|
||||
)
|
||||
|
||||
func osGetEnvironment() (*api.ServerEnvironment, error) {
|
||||
|
||||
Reference in New Issue
Block a user