From ac6a879d69daa117f8c53277f330e4aaf7d78d44 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..eabd3e471 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(shell) + if shell_basename == "nologin" or shell_basename == "false": + shell = find_binary("sh") def spawn_shell(cmd): -- 2.44.2