From 16127335f4a1671fa3ebd038a559ded8c5360450 Mon Sep 17 00:00:00 2001 From: "Kyle L. Henderson" Date: Tue, 16 May 2017 13:08:39 -0500 Subject: [PATCH] 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 --- scripts/os-cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/os-cmd b/scripts/os-cmd index 63496549ae..f3846cf903 100755 --- a/scripts/os-cmd +++ b/scripts/os-cmd @@ -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