fix getOS

This commit is contained in:
badaix 2017-03-19 20:47:09 +01:00
parent f05ff228fa
commit ed5a54e4ab

View file

@ -190,7 +190,7 @@ static std::string getOS()
#endif
if (os.empty())
{
os = trim_copy(execGetOutput("cat /etc/os-release /etc/openwrt_release |grep -e PRETTY_NAME -e DISTRIB_DESCRIPTION"));
os = trim_copy(execGetOutput("grep /etc/os-release /etc/openwrt_release -e PRETTY_NAME -e DISTRIB_DESCRIPTION"));
if (os.find("=") != std::string::npos)
{
os = trim_copy(os.substr(os.find("=") + 1));