From 0cce4b9c80e5348967240d3ccf4303f8b4442c78 Mon Sep 17 00:00:00 2001 From: satbaby Date: Thu, 8 Nov 2012 20:08:17 +0100 Subject: [PATCH] src/system/configure_network.cpp: use old startNetwork/stop --- src/system/configure_network.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/system/configure_network.cpp b/src/system/configure_network.cpp index 6eaa20d54..ff927a375 100644 --- a/src/system/configure_network.cpp +++ b/src/system/configure_network.cpp @@ -218,11 +218,11 @@ void CNetworkConfig::commitConfig(void) void CNetworkConfig::startNetwork(void) { - const char _ifup[] = "/sbin/ifup"; + std::string cmd = "/sbin/ifup " + ifname; #ifdef DEBUG - printf("CNetworkConfig::startNetwork: %s %s\n",_ifup, ifname.c_str()); + printf("CNetworkConfig::startNetwork: %s\n", cmd.c_str()); #endif - my_system(_ifup, ifname.c_str()); + my_system("/bin/sh", "-c", cmd.c_str()); if (!inet_static) { init_vars(); @@ -232,11 +232,11 @@ void CNetworkConfig::startNetwork(void) void CNetworkConfig::stopNetwork(void) { - const char _ifdown[] = "/sbin/ifdown"; + std::string cmd = "/sbin/ifdown " + ifname; #ifdef DEBUG - printf("CNetworkConfig::stopNetwork: %s %s\n",_ifdown, ifname.c_str()); + printf("CNetworkConfig::stopNetwork: %s\n", cmd.c_str()); #endif - my_system(_ifdown, ifname.c_str()); + my_system("/bin/sh", "-c", cmd.c_str()); }