aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-10-30 15:56:14 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2022-11-13 21:51:10 +0100
commitb2e83c16e1383eb817c1f34d7118b01cefa670d8 (patch)
treeb6dabb77c10b41235dcc37575d215a0bed36340e
parentde79a0a9e0679b03d35c92e3abbce6e9fbb19a9d (diff)
downloadupstream-b2e83c16e1383eb817c1f34d7118b01cefa670d8.tar.gz
upstream-b2e83c16e1383eb817c1f34d7118b01cefa670d8.tar.bz2
upstream-b2e83c16e1383eb817c1f34d7118b01cefa670d8.zip
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>
-rw-r--r--package/system/procd/files/service6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/system/procd/files/service b/package/system/procd/files/service
index 1ceacfe5ad..0ca7058041 100644
--- a/package/system/procd/files/service
+++ b/package/system/procd/files/service
@@ -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