Fix os_cmd script for tty
Add the '-1' parameter to lxc-ls so each container is listed on a single line, otherwise multiple container names were being listed on a single line and causing the command to fail when in a tty. Also use the '--filter' parameter to return only the utility containers rather than having lxc-ls process and return each container. Change-Id: Ifcf1f13392d17464a088ce2928f434387ca39365
This commit is contained in:
parent
c78faa84ce
commit
16127335f4
@ -47,7 +47,7 @@ __check_cmd_avail ${LXCATTACH}
|
||||
__check_cmd_avail ${LXCLS}
|
||||
|
||||
# Find the first utility container to execute in
|
||||
UTIL=$(${LXCLS} | grep utility | head -n 1)
|
||||
UTIL=$(${LXCLS} -1 --filter utility | head -n 1)
|
||||
if [ "z${UTIL}" == "z" ]; then
|
||||
echo "*** Couldn't find a utility container. Exiting..."
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user