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"”.
---
 daemons/daemon-util.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
index ab58ac5..1e928eb 100755
--- a/daemons/daemon-util.in
+++ b/daemons/daemon-util.in
@@ -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) \
-- 
1.6.4.3

Reply via email to