commit:     01704754311ada2c2154f501aebfda50710a185d
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  4 08:02:40 2020 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Jan  4 08:02:40 2020 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=01704754

shellcheck: fix Double quote array expansions to avoid re-splitting elements. 
[SC2068]

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 net/l2tp.sh | 2 +-
 net/pppd.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/l2tp.sh b/net/l2tp.sh
index 7c5b064..9644e32 100644
--- a/net/l2tp.sh
+++ b/net/l2tp.sh
@@ -81,7 +81,7 @@ _l2tp_get_tunnel_info() {
 
 _ip_l2tp_add() {
        local e
-       e="$(LC_ALL=C ip l2tp add $@ 2>&1 1>/dev/null)"
+       e="$(LC_ALL=C ip l2tp add "$@" 2>&1 1>/dev/null)"
        case $e in
                "")
                        return 0

diff --git a/net/pppd.sh b/net/pppd.sh
index 796722e..e3c4d43 100644
--- a/net/pppd.sh
+++ b/net/pppd.sh
@@ -163,7 +163,7 @@ pppd_pre_start()
        # We need to flatten the useless array
        set -- $(_get_array "chat_${IFVAR}")
        if [ $# != 0 ]; then
-               opts="${opts} connect '$(echo ${chatprog} $@ | sed -e 
"s:':'\\\\'':g")'"
+               opts="${opts} connect '$(echo ${chatprog} "$@" | sed -e 
"s:':'\\\\'':g")'"
        fi
 
        # Add plugins

Reply via email to