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

incus-agent: Set base directory

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-04-22 22:20:30 -04:00
parent 6e22aa905f
commit d9458b78c1
2 changed files with 6 additions and 5 deletions

View File

@@ -44,10 +44,11 @@ var (
osMetricsExcludeMountpoints = regexp.MustCompile(`^/(?:dev|proc|sys|var/lib/docker/.+)(?:$|/)`)
osMetricsExcludeFilesystems = []string{"autofs", "binfmt_misc", "bpf", "cgroup", "cgroup2", "configfs", "debugfs", "devpts", "devtmpfs", "fusectl", "hugetlbfs", "iso9660", "mqueue", "nsfs", "overlay", "proc", "procfs", "pstore", "rpc_pipefs", "securityfs", "selinuxfs", "squashfs", "sysfs", "tracefs"}
osShutdownSignal = unix.SIGTERM
osExitStatus = linux.ExitStatus
osExecWrapper = linux.NewExecWrapper
osMetricsSupported = true
osShutdownSignal = unix.SIGTERM
osExitStatus = linux.ExitStatus
osExecWrapper = linux.NewExecWrapper
osBaseWorkingDirectory = "/"
osMetricsSupported = true
)
func osGetEnvironment() (*api.ServerEnvironment, error) {

View File

@@ -65,7 +65,7 @@ func (r *sftpServe) Render(w http.ResponseWriter) error {
}
// Start sftp server.
server, err := sftp.NewServer(conn, sftp.WithAllocator())
server, err := sftp.NewServer(conn, sftp.WithAllocator(), sftp.WithServerWorkingDirectory(osBaseWorkingDirectory))
if err != nil {
return nil
}