]> git.ipfire.org Git - thirdparty/shadow.git/commit
shadow userdel: add the adaptation to the busybox ps in 01-kill_user_procs.sh
authorxiongshenglan <xiongshenglan@huawei.com>
Wed, 19 Jul 2023 07:13:06 +0000 (15:13 +0800)
committerSerge Hallyn <serge@hallyn.com>
Sat, 29 Jul 2023 02:24:36 +0000 (21:24 -0500)
commit7bced397c9fd66965753e5fc0fd3dfa535ca1c9b
tree8a01836b3d0b7ffdfeebd2cdb3a7f6ee42e6007f
parenta692c880f10bc561155cecda5e2bc4b40a669776
shadow userdel: add the adaptation to the busybox ps in 01-kill_user_procs.sh

In some embedded systems, users only use the ps
provided by the busybox. But the ps provided by
the busybox does not support the -eo option by
default. As a result, an error is reported when
the userdel is used. So add a judgment on ps.
If there is no ps -eo, traverse the process directly.

The error information is as follows:
 # userdel xsl
ps: invalid option -- 'e'

Signed-off-by: xiongshenglan <xiongshenglan@huawei.com>
etc/shadow-maint/userdel-pre.d/01-kill_user_procs.sh