mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-02 12:52:57 +00:00
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>
This commit is contained in:
parent
de79a0a9e0
commit
b2e83c16e1
@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
local service="$1"
|
local service="$1"
|
||||||
local cmd="$2"
|
shift
|
||||||
|
|
||||||
local boot status
|
local boot status
|
||||||
|
|
||||||
if [ -f "/etc/init.d/${service}" ]; then
|
if [ -f "/etc/init.d/${service}" ]; then
|
||||||
/etc/init.d/"${service}" "${cmd}"
|
/etc/init.d/"${service}" "$@"
|
||||||
exit "$?"
|
exit "$?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$service" ]; then
|
if [ -n "$service" ]; then
|
||||||
echo "Service \"$1\" not found:"
|
echo "Service \"$service\" not found:"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user