mirror of
git://github.com/lxc/lxc
synced 2025-08-31 11:09:33 +00:00
Fix lxc-ps -- argument processing
lxc-ps is supposed to pass arguments after the -- on to ps. The problem is that i is expanded once from $@ and the loop will iterate over all the arguments that were in $@ at the time of expansion. Inside the loop, there are shifts (in the name case for example) that are trying to remove more than a single argument. This changes fixes that and makes lxc-ps work as documented. Signed-off-by: Dwight Engen <dwight.engen@oracle.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
committed by
Daniel Lezcano
parent
f7a81eeb14
commit
a3812bf0c7
@@ -72,8 +72,8 @@ get_parent_cgroup()
|
||||
|
||||
containers=""
|
||||
list_container_processes=0
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
while true; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
help; exit 1;;
|
||||
-n|--name)
|
||||
|
Reference in New Issue
Block a user