From d2bc629d481775f08e0ff11de496e323fa811519 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 23 Mar 2024 14:30:33 +0100 Subject: [PATCH] initscripts: Handle command arguments as array For some reason, the function is refusing to launch a command that has extra arguments. Signed-off-by: Michael Tremer --- src/initscripts/system/functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 5a26aef45..5a66fd1e8 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -512,7 +512,7 @@ loadproc() esac fi - local cmd="${@}" + local cmd=( "${@}" ) if [ -n "${nicelevel}" ]; then cmd="nice -n "${nicelevel}" ${cmd}" @@ -520,12 +520,12 @@ loadproc() if [ -n "${background}" ]; then ( - ${cmd} &>/dev/null + ${cmd[@]} &>/dev/null ) & pid="$!" evaluate_retval else - ${cmd} + ${cmd[@]} pid="$!" evaluate_retval # This is "Probably" not LSB compliant, but required to be compatible with older bootscripts fi -- 2.39.5