提交 66c990e5 authored 作者: blu's avatar blu

new feature: evwifi

上级 1e526c65
...@@ -107,11 +107,12 @@ class WifiMgr { ...@@ -107,11 +107,12 @@ class WifiMgr {
wpaFile << wpaContent; wpaFile << wpaContent;
wpaFile.close(); wpaFile.close();
// TODO: verify // TODO: verify
exec("ifconfig wlan1 down"); exec("systemctl restart networking&");
exec("ifconfig wlan1 up"); // exec("ifconfig wlan1 down");
exec("systemctl enable wpa_supplicant@wlan1"); // exec("ifconfig wlan1 up");
exec("systemctl restart wpa_supplicant@wlan1"); // exec("systemctl enable wpa_supplicant@wlan1");
exec("dhclient -r wlan1"); // exec("systemctl restart wpa_supplicant@wlan1");
// exec("dhclient -r wlan1");
}else{ }else{
string msg = fmt::format("failed write wpa config to {}", wpaCfgPath); string msg = fmt::format("failed write wpa config to {}", wpaCfgPath);
ret["code"] = 2; ret["code"] = 2;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论