changes to allow node container commands to leverage shell parameter when needed

This commit is contained in:
Blake Harnden 2019-12-20 09:57:34 -08:00
parent e92441d728
commit 95c57bbad6
4 changed files with 14 additions and 11 deletions

View file

@ -47,9 +47,9 @@ class LxdClient:
def create_ns_cmd(self, cmd):
return f"nsenter -t {self.pid} -m -u -i -p -n {cmd}"
def check_cmd(self, cmd, wait=True):
def check_cmd(self, cmd, wait=True, shell=False):
args = self.create_cmd(cmd)
return utils.cmd(args, wait=wait)
return utils.cmd(args, wait=wait, shell=shell)
def copy_file(self, source, destination):
if destination[0] != "/":