From e7712396084943ce5e09b332c8f00e0d869bb22e Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 24 Oct 2013 15:11:43 -0700 Subject: [PATCH] Only restart network-manager if we've changed config --- examples/nat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/nat.py b/examples/nat.py index fcad85c..f8fb0b1 100755 --- a/examples/nat.py +++ b/examples/nat.py @@ -63,9 +63,9 @@ def fixNetworkManager( root, intf ): print '*** Adding', line.strip(), 'to', cfile with open( cfile, 'a' ) as f: f.write( line ) - # Probably need to restart network-manager to be safe - - # hopefully this won't disconnect you - root.cmd( 'service network-manager restart' ) + # Probably need to restart network-manager to be safe - + # hopefully this won't disconnect you + root.cmd( 'service network-manager restart' ) def connectToInternet( network, switch='s1', rootip='10.254', subnet='10.0/8'): """Connect the network to the internet