For some reason, the function is refusing to launch a command that has
extra arguments.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
esac
fi
- local cmd="${@}"
+ local cmd=( "${@}" )
if [ -n "${nicelevel}" ]; then
cmd="nice -n "${nicelevel}" ${cmd}"
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