| 20 | |
| 21 | using namespace dpfservice; |
| 22 | void Container::initialize() |
| 23 | { |
| 24 | qInfo() << __FUNCTION__; |
| 25 | //发布Container到edit导航栏界面布局 |
| 26 | if (QString(getenv("TERM")).isEmpty()) { |
| 27 | setenv("TERM", "xterm-256color", 1); |
| 28 | } |
| 29 | setenv("SHELL","/bin/bash",1); |
| 30 | |
| 31 | // 发布容器服务 |
| 32 | QString errStr; |
| 33 | auto &ctx = dpfInstance.serviceContext(); |
| 34 | if (!ctx.load(ContainerService::name(), &errStr)) { |
| 35 | qCritical() << errStr; |
| 36 | abort(); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | bool Container::start() |
| 41 | { |