mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
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 <michael.tremer@ipfire.org>
This commit is contained in:
@@ -512,7 +512,7 @@ loadproc()
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local cmd="${@}"
|
local cmd=( "${@}" )
|
||||||
|
|
||||||
if [ -n "${nicelevel}" ]; then
|
if [ -n "${nicelevel}" ]; then
|
||||||
cmd="nice -n "${nicelevel}" ${cmd}"
|
cmd="nice -n "${nicelevel}" ${cmd}"
|
||||||
@@ -520,12 +520,12 @@ loadproc()
|
|||||||
|
|
||||||
if [ -n "${background}" ]; then
|
if [ -n "${background}" ]; then
|
||||||
(
|
(
|
||||||
${cmd} &>/dev/null
|
${cmd[@]} &>/dev/null
|
||||||
) &
|
) &
|
||||||
pid="$!"
|
pid="$!"
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
else
|
else
|
||||||
${cmd}
|
${cmd[@]}
|
||||||
pid="$!"
|
pid="$!"
|
||||||
evaluate_retval # This is "Probably" not LSB compliant, but required to be compatible with older bootscripts
|
evaluate_retval # This is "Probably" not LSB compliant, but required to be compatible with older bootscripts
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user