mirror of
https://github.com/containers/podman
synced 2024-10-22 02:03:38 +00:00
Extend search path for conmon
Adding /usr/libexec/crio/conmon to the list of places to look for conmon. Signed-off-by: baude <bbaude@redhat.com> Closes: #172 Approved by: rhatdan
This commit is contained in:
parent
ef4035e208
commit
1a48c426c9
|
@ -63,7 +63,7 @@ var (
|
|||
ImageDefaultTransport: DefaultTransport,
|
||||
InMemoryState: false,
|
||||
RuntimePath: "/usr/bin/runc",
|
||||
ConmonPath: "/usr/local/libexec/crio/conmon",
|
||||
ConmonPath: findConmonPath(),
|
||||
ConmonEnvVars: []string{
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
},
|
||||
|
@ -79,6 +79,15 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
func findConmonPath() string {
|
||||
path := "/usr/local/libexec/crio/conmon"
|
||||
_, err := os.Stat(path)
|
||||
if err != nil {
|
||||
path = "/usr/libexec/crio/conmon"
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
// NewRuntime creates a new container runtime
|
||||
// Options can be passed to override the default configuration for the runtime
|
||||
func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) {
|
||||
|
|
Loading…
Reference in a new issue