procd: service: pass all arguments to service

Passing all arguments to /etc/init.d/$service restores the
behaviour of openwrt 21.02. This is relevant for services
such as etherwake which take more then one argument, e.g.:
"service etherwake start <list of devices to wake>"

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
(cherry picked from commit b2e83c16e1383eb817c1f34d7118b01cefa670d8)
This commit is contained in:
Andrew Ammerlaan 2022-10-30 15:56:14 +01:00 committed by Tianling Shen
parent 6c1ebe4474
commit 41ad44de0a
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -2,17 +2,17 @@
main() {
local service="$1"
local cmd="$2"
shift
local boot status
if [ -f "/etc/init.d/${service}" ]; then
/etc/init.d/"${service}" "${cmd}"
/etc/init.d/"${service}" "$@"
exit "$?"
fi
if [ -n "$service" ]; then
echo "Service \"$1\" not found:"
echo "Service \"$service\" not found:"
exit 1
fi