[PC-BSD Commits] r6961 - in pcbsd: current/pcbsd-netmanager/src/NetworkManagerAdmin current/pcbsd-netmanager/src/wificonfig stable/pcbsd-netmanager/src/NetworkManagerAdmin stable/pcbsd-netmanager/src/wificonfig
svn at pcbsd.org
svn at pcbsd.org
Wed Jun 16 08:28:52 PDT 2010
Author: kris
Date: 2010-06-16 08:28:52 -0700 (Wed, 16 Jun 2010)
New Revision: 6961
Modified:
pcbsd/current/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp
pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
pcbsd/stable/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp
pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
Log:
Updated wifi / net man admin tool to restart networking in a more consistent manner
Modified: pcbsd/current/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp
===================================================================
--- pcbsd/current/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp 2010-06-16 15:21:07 UTC (rev 6960)
+++ pcbsd/current/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp 2010-06-16 15:28:52 UTC (rev 6961)
@@ -641,13 +641,13 @@
void NetworkManAdmin::restartNetwork()
{
- //Set the hostname
- runCommand("hostname " + lineHostname->text());
+ //Set the hostname
+ runCommand("hostname " + lineHostname->text());
- // Set the gateway device name
- if ( lineGateway->text() != "..." ) {
- runCommand("route flush ; route add default " + lineGateway->text() );
- }
+ getLineFromCommandOutput("sync");
+ getLineFromCommandOutput("route -n flush");
+ getLineFromCommandOutput("/etc/rc.d/netif restart");
+ getLineFromCommandOutput("/etc/rc.d/routing restart");
if ( checkPPPOE->isChecked() ) {
runCommand("/etc/rc.d/ppp restart &");
Modified: pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp 2010-06-16 15:21:07 UTC (rev 6960)
+++ pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp 2010-06-16 15:28:52 UTC (rev 6961)
@@ -239,11 +239,12 @@
}
- runCommand("sync");
+ getLineFromCommandOutput("sync");
runCommand("ifconfig lagg0 destroy");
- runCommand("route -n flush");
- runCommand("/etc/rc.d/netif start");
- runCommand("/etc/rc.d/routing start");
+ getLineFromCommandOutput("route -n flush");
+ getLineFromCommandOutput("/etc/rc.d/netif restart");
+ getLineFromCommandOutput("/etc/rc.d/routing restart");
+
pushApply->setEnabled(FALSE);
}
Modified: pcbsd/stable/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp
===================================================================
--- pcbsd/stable/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp 2010-06-16 15:21:07 UTC (rev 6960)
+++ pcbsd/stable/pcbsd-netmanager/src/NetworkManagerAdmin/netmanadmin.cpp 2010-06-16 15:28:52 UTC (rev 6961)
@@ -641,13 +641,13 @@
void NetworkManAdmin::restartNetwork()
{
- //Set the hostname
- runCommand("hostname " + lineHostname->text());
+ //Set the hostname
+ runCommand("hostname " + lineHostname->text());
- // Set the gateway device name
- if ( lineGateway->text() != "..." ) {
- runCommand("route flush ; route add default " + lineGateway->text() );
- }
+ getLineFromCommandOutput("sync");
+ getLineFromCommandOutput("route -n flush");
+ getLineFromCommandOutput("/etc/rc.d/netif restart");
+ getLineFromCommandOutput("/etc/rc.d/routing restart");
if ( checkPPPOE->isChecked() ) {
runCommand("/etc/rc.d/ppp restart &");
Modified: pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp 2010-06-16 15:21:07 UTC (rev 6960)
+++ pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp 2010-06-16 15:28:52 UTC (rev 6961)
@@ -239,11 +239,12 @@
}
- runCommand("sync");
+ getLineFromCommandOutput("sync");
runCommand("ifconfig lagg0 destroy");
- runCommand("route -n flush");
- runCommand("/etc/rc.d/netif start");
- runCommand("/etc/rc.d/routing start");
+ getLineFromCommandOutput("route -n flush");
+ getLineFromCommandOutput("/etc/rc.d/netif restart");
+ getLineFromCommandOutput("/etc/rc.d/routing restart");
+
pushApply->setEnabled(FALSE);
}
More information about the Commits
mailing list