commit:     7ff5d213660e5df80aba8782e5cfe4373416ed86
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 25 00:42:40 2021 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Mar 25 00:45:41 2021 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=7ff5d213

functions.sh: Fix non-netns case for ip command

Attempt to wrap ip commands with a netns would fail sometimes when
there is no netns defined. This fixes to not use the variable when
it is not needed.

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sh/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sh/functions.sh b/sh/functions.sh
index d4a514b..96df289 100644
--- a/sh/functions.sh
+++ b/sh/functions.sh
@@ -164,7 +164,7 @@ _netns()
                case "${1}" in
                        ip)
                                shift
-                               "${ip}" "${@}"
+                               ip "${@}"
                        ;;
                        glob)
                                shift

Reply via email to