seperate out the terminal functions from lxc Upstream-commit: d8b60cb5929b35d35695708ffb8595bc55d2b37f Component: engine