Fixed shell invocation bug in onie-sysinfo

This commit is contained in:
Carl D. Roth
2018-09-20 18:14:08 -07:00
parent f93816925a
commit 4f5655060d

View File

@@ -242,8 +242,10 @@ class OnieSysinfoApp(SubprocessMixin, object):
with InitrdContext(initrd=initrd, log=self.log) as ctx:
cmd = ['onie-sysinfo',]
cmd.extend(self.args)
self.log.info("foo!")
cmd = 'IFS=;' + " ".join(cmd)
cmd = ('chroot', ctx.dir,
'/bin/sh', '-c', 'IFS=;' + " ".join(cmd))
'/bin/sh', '-c', cmd,)
try:
self.output = self.check_output(cmd)
ret = 0