mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
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:
@@ -56,7 +56,7 @@ static struct network_service services[SERVICE_COUNT] =
|
|||||||
{ "FTP", "vsftpd", "", LOCALE_MENU_HINT_NET_FTPD, "", 0 },
|
{ "FTP", "vsftpd", "", LOCALE_MENU_HINT_NET_FTPD, "", 0 },
|
||||||
{ "Telnet", "telnetd", "-l/bin/login", LOCALE_MENU_HINT_NET_TELNET, "", 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 },
|
{ "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)
|
CNetworkService::CNetworkService(std::string cmd, std::string opts)
|
||||||
@@ -72,8 +72,9 @@ CNetworkService::CNetworkService(std::string cmd, std::string opts)
|
|||||||
|
|
||||||
void CNetworkService::Start()
|
void CNetworkService::Start()
|
||||||
{
|
{
|
||||||
|
std::string cmd = command + " " + options;
|
||||||
printf("CNetworkService::Start: %s %s\n", command.c_str(), options.c_str());
|
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;
|
enabled = true;
|
||||||
TouchFile();
|
TouchFile();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user