Properly kill processes in namespaces on DHCP/L3 agent stop/start

get_pid_list_for_ns_list function uses namespaces list as an argument.
Variable $ns_list is a string of namespaces divided by spaces.
To properly use all of its values we need to use all arguments ($@).

Change-Id: I32654bf7e537247f97070ed27ab8d7b4de5b35c7
Closes-bug: #1442251
This commit is contained in:
Sergey Kolekonov 2015-04-09 19:38:39 +03:00
parent 4b9e69a08d
commit d3816fe2ba
2 changed files with 4 additions and 4 deletions

View File

@ -444,8 +444,8 @@ get_ns_list() {
}
get_pid_list_for_ns_list() {
# the first parameter is a list of ns names for searching pids
local ns_list="$1"
# Parameters contain namespace names for searching pids
local ns_list="$@"
local pids=`for netns in $ns_list ; do ip netns pids $netns ; done`
echo $pids
}

View File

@ -466,8 +466,8 @@ get_ns_list() {
}
get_pid_list_for_ns_list() {
# the first parameter is a list of ns names for searching pids
local ns_list="$1"
# Parameters contain namespace names for searching pids
local ns_list="$@"
local pids=`for netns in $ns_list ; do ip netns pids $netns ; done`
echo $pids
}