Commit a3812bf0 by Dwight Engen Committed by Daniel Lezcano

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: 's avatarDwight Engen <dwight.engen@oracle.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent f7a81eeb
...@@ -72,8 +72,8 @@ get_parent_cgroup() ...@@ -72,8 +72,8 @@ get_parent_cgroup()
containers="" containers=""
list_container_processes=0 list_container_processes=0
for i in "$@"; do while true; do
case $i in case $1 in
-h|--help) -h|--help)
help; exit 1;; help; exit 1;;
-n|--name) -n|--name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment