mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
cmd/podman, pkg/domain/infra: sockets should live in /var/run on FreeBSD
The /var/run directory is the preferred location for unix domain sockets. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
@ -12,9 +12,6 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultRootAPIPath is the default path of the REST socket
|
|
||||||
const DefaultRootAPIPath = "/run/podman/podman.sock"
|
|
||||||
|
|
||||||
// DefaultRootAPIAddress is the default address of the REST socket with unix: prefix
|
// DefaultRootAPIAddress is the default address of the REST socket with unix: prefix
|
||||||
const DefaultRootAPIAddress = "unix:" + DefaultRootAPIPath
|
const DefaultRootAPIAddress = "unix:" + DefaultRootAPIPath
|
||||||
|
|
||||||
|
7
cmd/podman/registry/registry_common.go
Normal file
7
cmd/podman/registry/registry_common.go
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//go:build !freebsd
|
||||||
|
// +build !freebsd
|
||||||
|
|
||||||
|
package registry
|
||||||
|
|
||||||
|
// DefaultRootAPIPath is the default path of the REST socket
|
||||||
|
const DefaultRootAPIPath = "/run/podman/podman.sock"
|
4
cmd/podman/registry/registry_freebsd.go
Normal file
4
cmd/podman/registry/registry_freebsd.go
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package registry
|
||||||
|
|
||||||
|
// DefaultRootAPIPath is the default path of the REST socket
|
||||||
|
const DefaultRootAPIPath = "/var/run/podman/podman.sock"
|
@ -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
|
// we are reporting the default systemd activation socket path as we cannot know if a future
|
||||||
// service may be run with another URI.
|
// service may be run with another URI.
|
||||||
if ic.Libpod.RemoteURI() == "" {
|
if ic.Libpod.RemoteURI() == "" {
|
||||||
xdg := "/run"
|
xdg := defaultRunPath
|
||||||
if path, err := util.GetRuntimeDir(); err != nil {
|
if path, err := util.GetRuntimeDir(); err != nil {
|
||||||
// Info is as good as we can guess...
|
// Info is as good as we can guess...
|
||||||
return info, err
|
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