From 806c5de12a3a5e8a54bf72e71a879badd0557c10 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Tue, 12 Sep 2023 08:18:24 -0400 Subject: [PATCH] Podmansh: use podmansh_timeout podmansh_timeout is now a configurable option in containers.conf. [NO NEW TESTS NEEDED] Signed-off-by: Lokesh Mandvekar --- cmd/podman/main.go | 5 ++--- docs/source/markdown/podmansh.1.md | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/podman/main.go b/cmd/podman/main.go index dcc0d1eca3..e635c3441f 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "path/filepath" + "strconv" "strings" _ "github.com/containers/podman/v4/cmd/podman/completion" @@ -43,9 +44,7 @@ func main() { (len(os.Args[0]) > 0 && filepath.Base(os.Args[0][1:]) == registry.PodmanSh) { shell := strings.TrimPrefix(os.Args[0], "-") - // The wait timeout will soon be made configurable via the - // upcoming `podmansh_timeout` option in containers.conf - args := []string{shell, "exec", "-i", "--wait", "30"} + args := []string{shell, "exec", "-i", "--wait", strconv.FormatUint(uint64(registry.PodmanConfig().ContainersConfDefaultsRO.Engine.PodmanshTimeout), 10)} if term.IsTerminal(0) || term.IsTerminal(1) || term.IsTerminal(2) { args = append(args, "-t") } diff --git a/docs/source/markdown/podmansh.1.md b/docs/source/markdown/podmansh.1.md index 3b598b1cda..44ec4526a7 100644 --- a/docs/source/markdown/podmansh.1.md +++ b/docs/source/markdown/podmansh.1.md @@ -20,6 +20,8 @@ Systemd will automatically create the container when the user session is started Administrators can use volumes to expose specific host data from the host system to the user, without the user being exposed to other parts of the system. +Timeout for podmansh can be set using the `podmansh_timeout` option in containers.conf. + ## Setup Create user login session using useradd while running as root. @@ -126,7 +128,7 @@ _EOF ``` ## SEE ALSO -**[podman(1)](podman.1.md)**, **[podman-exec(1)](podman-exec.1.md)**, **quadlet(5)** +**[containers.conf(5)](containers.conf.5.md)**, **[podman(1)](podman.1.md)**, **[podman-exec(1)](podman-exec.1.md)**, **quadlet(5)** ## HISTORY May 2023, Originally compiled by Dan Walsh