Commit 03956d39 authored by Michael Hanselmann's avatar Michael Hanselmann

daemon-util: Fix quoting issue

This patch fixes a quoting issue in daemon-util:

$ EXTRA_MASTERD_ARGS=--no-voting /etc/init.d/ganeti restart
[…]
* ganeti-masterd...
/…/ganeti/daemon-util: line 65: local: `--no-voting': not a valid identifier

The reason was that the generated variables were not quoted properly and
the troublesome line expanded to
“local args=$MASTERD_ARGS $EXTRA_MASTERD_ARGS” instead of the correct
“local args="$MASTERD_ARGS $EXTRA_MASTERD_ARGS"”.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 0175fd8c
......@@ -62,7 +62,7 @@ start() {
local ucname=$(tr a-z A-Z <<< ${name#ganeti-})
# Read $<daemon>_ARGS and $EXTRA_<daemon>_ARGS
eval local args="\$${ucname}_ARGS \$EXTRA_${ucname}_ARGS"
eval local args="\"\$${ucname}_ARGS \$EXTRA_${ucname}_ARGS\""
start-stop-daemon --start --quiet --oknodo \
--pidfile $(_daemon_pidfile $name) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment