gui/network_service.cpp: use sh -c to start network service

Origin commit data
------------------
Commit: 1c6b35795e
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-11-02 (Fri, 02 Nov 2012)
This commit is contained in:
[CST] Focus
2012-11-02 18:08:23 +04:00
parent 13132db466
commit f459ea4f1b

View File

@@ -56,7 +56,7 @@ static struct network_service services[SERVICE_COUNT] =
{ "FTP", "vsftpd", "", LOCALE_MENU_HINT_NET_FTPD, "", 0 },
{ "Telnet", "telnetd", "-l/bin/login", LOCALE_MENU_HINT_NET_TELNET, "", 0 },
{ "DjMount", "djmount", "-o iocharset=utf8 /media/00upnp/", LOCALE_MENU_HINT_NET_DJMOUNT, "", 0 },
{ "uShare", "ushare", "-D", LOCALE_MENU_HINT_NET_USHARE, "", 0 }
{ "uShare", "ushare", "-D -n `cat /etc/hostname`", LOCALE_MENU_HINT_NET_USHARE, "", 0 }
};
CNetworkService::CNetworkService(std::string cmd, std::string opts)
@@ -72,8 +72,9 @@ CNetworkService::CNetworkService(std::string cmd, std::string opts)
void CNetworkService::Start()
{
std::string cmd = command + " " + options;
printf("CNetworkService::Start: %s %s\n", command.c_str(), options.c_str());
my_system( command.c_str(), options.c_str());
my_system("/bin/sh", "-c", cmd.c_str());
enabled = true;
TouchFile();
}