提交 1cae19bf authored 作者: blu's avatar blu

evdaemon: devsn bugfix

上级 cdeae768
...@@ -943,6 +943,8 @@ public: ...@@ -943,6 +943,8 @@ public:
exit(1); exit(1);
} }
devSn = info["sn"];
spdlog::info("evdaemon boot \n{}",info.dump()); spdlog::info("evdaemon boot \n{}",info.dump());
string cmd = "hostnamectl set-hostname EVB-" + info["sn"].get<string>(); string cmd = "hostnamectl set-hostname EVB-" + info["sn"].get<string>();
system(cmd.c_str()); system(cmd.c_str());
...@@ -958,8 +960,6 @@ public: ...@@ -958,8 +960,6 @@ public:
jsonIPs.push_back(k); jsonIPs.push_back(k);
} }
devSn = info["sn"];
char* strEnv = getenv("BOOTSTRAP"); char* strEnv = getenv("BOOTSTRAP");
if(strEnv != nullptr && memcmp(strEnv, "false", 5) == 0) { if(strEnv != nullptr && memcmp(strEnv, "false", 5) == 0) {
bBootstrap = false; bBootstrap = false;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论