From 23c830704d44ee2616a6f23df7f13622a5860d61 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 13 May 2024 15:33:14 +0200 Subject: [PATCH] Add configuration for podmansh Use the configuration parameters from the newly introduced PodmanshConfig struct. This allows podmansh to be configured via configuration files. Signed-off-by: phoenix --- cmd/podman/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 6a7ef36ae8..dd5b984d8d 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -43,12 +43,13 @@ func main() { if filepath.Base(os.Args[0]) == registry.PodmanSh || (len(os.Args[0]) > 0 && filepath.Base(os.Args[0][1:]) == registry.PodmanSh) { shell := strings.TrimPrefix(os.Args[0], "-") + cfg := registry.PodmanConfig() - args := []string{shell, "exec", "-i", "--wait", strconv.FormatUint(uint64(registry.PodmanConfig().ContainersConfDefaultsRO.Engine.PodmanshTimeout), 10)} + args := []string{shell, "exec", "-i", "--wait", strconv.FormatUint(uint64(cfg.ContainersConfDefaultsRO.PodmanshTimeout()), 10)} if term.IsTerminal(0) || term.IsTerminal(1) || term.IsTerminal(2) { args = append(args, "-t") } - args = append(args, registry.PodmanSh, "/bin/sh") + args = append(args, cfg.ContainersConfDefaultsRO.Podmansh.Container, cfg.ContainersConfDefaultsRO.Podmansh.Shell) if len(os.Args) > 1 { args = append(args, os.Args[1:]...) }