pkg/config: turn ConmonRsPath into attributedstring.Slice

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg 2023-10-25 14:10:16 +02:00
parent fbafbc0cb6
commit f09869b142
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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",