network-service: remove hardcoded paths

Origin commit data
------------------
Branch: ni/coolstream
Commit: dae578f3d6
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-12-10 (Thu, 10 Dec 2020)

Origin message was:
------------------
- network-service: remove hardcoded paths

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2020-12-10 21:44:19 +01:00
parent 69335ec218
commit e44e1f3a32

View File

@@ -176,12 +176,8 @@ int CNetworkServiceSetup::showNetworkServiceSetup()
items[i] = new CNetworkService(services[i].cmd, services[i].options);
services[i].enabled = items[i]->Enabled();
std::string execute1 = "/bin/" + services[i].cmd;
std::string execute2 = "/sbin/" + services[i].cmd;
active = false;
if ( !(access(execute1, F_OK)) || !(access(execute2, F_OK)) )
active = true;
std::string exec = find_executable(services[i].cmd.c_str());
active = !exec.empty();
if ( (services[i].name == "Telnet") && useinetd)
active = false;