Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initramfs: fix killing child PIDs #496

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

oldium
Copy link
Contributor

@oldium oldium commented Oct 31, 2024

Ubuntu's initramfs Busybox does not support ps -o pid,ppid, so fallback to unpredictable ps -l. In any case use awk to find the position of PID and PPID columns and dump appropriate child PIDs. This should be hopefully bullet-proof.

Also clean-up leftover PID file.

Fixes issue found when running under Ubuntu's version of Busybox. Former fix #449 is not enough.

Fixes: https://bugs.launchpad.net/ubuntu/+source/clevis/+bug/2065149

Ubuntu's initramfs Busybox does not support `ps -o pid,ppid`, so fallback
to unpredictable `ps -l`. In any case use `awk` to find the position of PID
and PPID columns and dump appropriate child PIDs. This should be hopefully
bullet-proof.

Also clean-up leftover PID file.

Signed-off-by: Oldřich Jedlička <[email protected]>
@oldium oldium mentioned this pull request Nov 3, 2024
Copy link
Collaborator

@sergio-correia sergio-correia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@sergio-correia sergio-correia merged commit 55eb002 into latchset:master Nov 7, 2024
12 checks passed
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.

2 participants