From f09869b142f161bf7b4c3f6b15d74b7cedcc2d4f Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 25 Oct 2023 14:10:16 +0200 Subject: [PATCH] pkg/config: turn ConmonRsPath into attributedstring.Slice Signed-off-by: Valentin Rothberg --- common/pkg/config/config.go | 4 ++-- common/pkg/config/default.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/pkg/config/config.go b/common/pkg/config/config.go index ed0b7514b4..94f95692a8 100644 --- a/common/pkg/config/config.go +++ b/common/pkg/config/config.go @@ -259,7 +259,7 @@ type EngineConfig struct { // ConmonRsPath is the path to the Conmon-rs binary used for managing containers. // The first path pointing to a valid file will be used. - ConmonRsPath []string `toml:"conmonrs_path,omitempty"` + ConmonRsPath attributedstring.Slice `toml:"conmonrs_path,omitempty"` // CompatAPIEnforceDockerHub enforces using docker.io for completing // short names in Podman's compatibility REST API. Note that this will @@ -884,7 +884,7 @@ func findConmonPath(paths []string, binaryName string) (string, error) { // to first (version) matching conmonrs binary. If non is found, we try // to do a path lookup of "conmonrs". func (c *Config) FindConmonRs() (string, error) { - return findConmonPath(c.Engine.ConmonRsPath, "conmonrs") + return findConmonPath(c.Engine.ConmonRsPath.Get(), "conmonrs") } // GetDefaultEnv returns the environment variables for the container. diff --git a/common/pkg/config/default.go b/common/pkg/config/default.go index 2ffe802bdd..5431a97ced 100644 --- a/common/pkg/config/default.go +++ b/common/pkg/config/default.go @@ -412,7 +412,7 @@ func defaultEngineConfig() (*EngineConfig, error) { "/usr/local/sbin/conmon", "/run/current-system/sw/bin/conmon", }} - c.ConmonRsPath = []string{ + c.ConmonRsPath = attributedstring.Slice{Values: []string{ "/usr/libexec/podman/conmonrs", "/usr/local/libexec/podman/conmonrs", "/usr/local/lib/podman/conmonrs", @@ -421,7 +421,7 @@ func defaultEngineConfig() (*EngineConfig, error) { "/usr/local/bin/conmonrs", "/usr/local/sbin/conmonrs", "/run/current-system/sw/bin/conmonrs", - } + }} c.PullPolicy = DefaultPullPolicy c.RuntimeSupportsJSON = []string{ "crun",