base-files: fix service_running check
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 15 Jun 2021 06:48:18 +0000 (08:48 +0200)
committerSungbo Eo <mans0n@gorani.run>
Sat, 4 Dec 2021 00:39:11 +0000 (09:39 +0900)
commitdd681838d370f1f6f6fa1bf1f22b0414322292f3
tree680c84b80f842a040635dc95a6c40b2774e06387
parentc33eb0372e7cbc404eb77a811bca7fe1eed8a2a9
base-files: fix service_running check

The following command checks if a instance of a service is running.
/etc/init.d/<service> running <instance>

 In the variable `$@`, which is passed to the function
`service_running`, the first argument is always the `instance` which
should be checked. Because all other variables where removed from `$@`
with `shift`.

Before this change the first argument of `$@` was set to the `$service`
Variable. So the function does not work as expected. The `$service`
variable was always the instance which should be checked. This is not
what we want.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
package/base-files/files/etc/rc.common