From b3b38b9834fcfb8580b4b31241e15fc337d10eee Mon Sep 17 00:00:00 2001 From: Jacob Abel Date: Sat, 10 Aug 2024 14:13:07 -0400 Subject: [PATCH] bin/dispatch-conf: Avoid nologin shell Checks if the default shell is set to either nologin or false and uses the bourne shell instead in those cases. Bug: https://bugs.gentoo.org/910560 Signed-off-by: Jacob Abel --- bin/dispatch-conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 93164d909..3b06724c9 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -577,6 +577,10 @@ def clear_screen(): shell = os.environ.get("SHELL") if not shell or not os.access(shell, os.EX_OK): shell = find_binary("sh") +else: + shell_basename = os.path.basename(shlex.split(shell)[0]) + if shell_basename == "nologin" or shell_basename == "false": + shell = find_binary("sh") def spawn_shell(cmd): -- 2.44.2