From 3ac4295286c16e83547eb27bd236ff7cebb92653 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 2 Nov 2012 18:08:23 +0400 Subject: [PATCH] gui/network_service.cpp: use sh -c to start network service Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1c6b35795e786ce05fef5cb3922ccaec65626e18 Author: [CST] Focus Date: 2012-11-02 (Fri, 02 Nov 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/network_service.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/network_service.cpp b/src/gui/network_service.cpp index 23ca4bc48..b2971471e 100644 --- a/src/gui/network_service.cpp +++ b/src/gui/network_service.cpp @@ -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(); }