fedora-sysv / initscripts

📜 Scripts to bring up network interfaces and legacy utilities in Fedora.
GNU General Public License v2.0
46 stars 52 forks source link

killproc() does not execute properly on a busybox-bash environment #396

Closed mengtanhzc closed 2 years ago

mengtanhzc commented 2 years ago

initscripts version the issue has been seen with 1) initscripts 10.06 2) BusyBox v1.32.1

Steps to reproduce the problem

    #!/bin/bash

    . /etc/init.d/functions

    test()
    {
            sleep 30 &
            killproc sleep
    }

    test

run this testcase returns an error, and sleep is not killed. image

Instead of using bash package on my environment, I am using busybox-bash, but busybox-bash does not support +=, thus causing this problem. Can I submit a PR to fix this problem?

jamacku commented 2 years ago

Feel free to submit a PR I'll be happy to review it.

mengtanhzc commented 2 years ago

Feel free to submit a PR I'll be happy to review it.

Thank you very much! I have just created a PR to solve it, please review~

jamacku commented 2 years ago

Thank you for your contribution!