Skip to content

Propagate exit's status so Cockpit accepts ash as a login shell - #31

Merged
nebuff merged 1 commit into
mainfrom
30-fix-unsupported-shell-error-under-linux-cockpit
Oct 26, 2026
Merged

nebuff merged 1 commit into
mainfrom
30-fix-unsupported-shell-error-under-linux-cockpit

Conversation

@nebuff

@nebuff nebuff commented Oct 26, 2026

Copy link
Copy Markdown
Member

Cockpit decides whether a login shell is usable by running <shell> -c "exit 71;" and accepting only exit status 71; anything else is reported at login as "unsupported shell" (issue #30). ash intercepted exit to break out of the REPL/-c loop but always exited 0, so setting ash as the default shell locked Cockpit out.

run_command_line now returns the status alongside the "exiting" flag, and exit n follows POSIX rules: keep the last status when no argument is given, use the low eight bits of n otherwise, and report 2 for a non-numeric argument. The interactive REPL hands the same status back too.

Cockpit decides whether a login shell is usable by running
`<shell> -c "exit 71;"` and accepting only exit status 71; anything else
is reported at login as "unsupported shell" (issue #30). ash intercepted
`exit` to break out of the REPL/-c loop but always exited 0, so setting
ash as the default shell locked Cockpit out.

run_command_line now returns the status alongside the "exiting" flag, and
`exit n` follows POSIX rules: keep the last status when no argument is
given, use the low eight bits of n otherwise, and report 2 for a
non-numeric argument. The interactive REPL hands the same status back too.
@nebuff nebuff self-assigned this Oct 26, 2026
@nebuff nebuff linked an issue Oct 26, 2026 that may be closed by this pull request
@nebuff
nebuff merged commit 1a0f66b into main Oct 26, 2026
1 check passed
@nebuff
nebuff deleted the 30-fix-unsupported-shell-error-under-linux-cockpit branch October 26, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix "unsupported shell" error under linux cockpit

1 participant