mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
rework system connection and farm storage
We now no longer write containers.conf, instead system connections and farms are written to a new file called podman-connections.conf. This is a major rework and I had to change a lot of things to get this to compile again with my c/common changes. It is a breaking change for users as connections/farms added before this commit can now no longer be removed or modified directly. However because the logic keeps reading from containers.conf the old connections can still be used to connect to a remote host. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
25
vendor/github.com/containers/common/pkg/config/config_unix.go
generated
vendored
Normal file
25
vendor/github.com/containers/common/pkg/config/config_unix.go
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
//go:build !windows
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
)
|
||||
|
||||
// userConfigPath returns the path to the users local config that is
|
||||
// not shared with other users. It uses $XDG_CONFIG_HOME/containers...
|
||||
// if set or $HOME/.config/containers... if not.
|
||||
func userConfigPath() (string, error) {
|
||||
if configHome := os.Getenv("XDG_CONFIG_HOME"); configHome != "" {
|
||||
return filepath.Join(configHome, _configPath), nil
|
||||
}
|
||||
home, err := unshare.HomeDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return filepath.Join(home, UserOverrideContainersConfig), nil
|
||||
}
|
||||
Reference in New Issue
Block a user