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

[OpenWrt] Fix BusyBox ps unsupported flags #1621

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

macie
Copy link
Contributor

@macie macie commented Mar 23, 2025

Errors /bin/ps: unrecognized option: a and /bin/ps: unrecognized option: x blocks multiple tests.

This is a part of enabling support for OpenWrt, see: #1600.

(more details in commit messages)

macie added 2 commits March 23, 2025 21:54
Command `ps ax | grep '<WORD1>|<WORD2>' | grep -v 'grep'` can be directly
transformed to `IsRunning '<WORD1>' || IsRunning '<WORD2>'`.

`IsRunning` supports BusyBox `ps` (without `-ax` option, see: <https://github.com/mirror/busybox/blob/master/procps/ps.c>).
BusyBox not implements flags `-ax` (see: <https://github.com/mirror/busybox/blob/master/procps/ps.c>)
Calling it throws an error: `/bin/ps: unrecognized option: a`.

`IsRunning` function cannot be used here due to complex searching rules.
@macie macie mentioned this pull request Mar 23, 2025
5 tasks
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.

1 participant