mirror of
https://github.com/containers/podman.git
synced 2026-03-04 14:57:22 -05:00
Merge pull request #19049 from dfr/freebsd-api-server
Add support for 'podman system service' on FreeBSD
This commit is contained in:
15
pkg/api/handlers/compat/containers_stats_freebsd.go
Normal file
15
pkg/api/handlers/compat/containers_stats_freebsd.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package compat
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/containers/podman/v4/pkg/api/handlers/utils"
|
||||
)
|
||||
|
||||
const DefaultStatsPeriod = 5 * time.Second
|
||||
|
||||
func StatsContainer(w http.ResponseWriter, r *http.Request) {
|
||||
utils.Error(w, http.StatusBadRequest, fmt.Errorf("compat.StatsContainer not supported on FreeBSD"))
|
||||
}
|
||||
@@ -35,7 +35,7 @@ func (ic *ContainerEngine) Info(ctx context.Context) (*define.Info, error) {
|
||||
// we are reporting the default systemd activation socket path as we cannot know if a future
|
||||
// service may be run with another URI.
|
||||
if ic.Libpod.RemoteURI() == "" {
|
||||
xdg := "/run"
|
||||
xdg := defaultRunPath
|
||||
if path, err := util.GetRuntimeDir(); err != nil {
|
||||
// Info is as good as we can guess...
|
||||
return info, err
|
||||
|
||||
4
pkg/domain/infra/abi/system_freebsd.go
Normal file
4
pkg/domain/infra/abi/system_freebsd.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package abi
|
||||
|
||||
// Default path for system runtime state
|
||||
const defaultRunPath = "/var/run"
|
||||
4
pkg/domain/infra/abi/system_linux.go
Normal file
4
pkg/domain/infra/abi/system_linux.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package abi
|
||||
|
||||
// Default path for system runtime state
|
||||
const defaultRunPath = "/run"
|
||||
Reference in New Issue
Block a user