From: Michael Tremer Date: Sun, 23 Sep 2018 15:53:46 +0000 (+0200) Subject: util: Parse command line correctly when running commands X-Git-Tag: 010~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85f35e510e4a1a7285d4673872e4e87f77f552a1;p=network.git util: Parse command line correctly when running commands Before, empty arguments where just dropped Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.util b/src/functions/functions.util index 58afa938..b7674238 100644 --- a/src/functions/functions.util +++ b/src/functions/functions.util @@ -532,11 +532,11 @@ cmd_quiet() { } cmd_exec() { - local cmd=$@ + local cmd=( "$@" ) log DEBUG "Exec'ing command: ${cmd}" - exec ${cmd} + exec "${cmd[@]}" log ERROR "Could not exec-ute: ${cmd}" exit ${EXIT_ERROR}