(take II) Don't deactivate active device before running nm-c-e (#608773)
ifcfg-rh is watching IN_CLOSE_WRITE event so we should
write directly into ifcfg file when updating it instead
of creating temporary, removing original and moving temporary.
---
simpleconfig.py | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
import string
import os
-import tempfile
import shutil
# use our own ASCII only uppercase function to avoid locale issues
@@ -124,9 +123,8 @@ class IfcfgFile(SimpleConfigFile):
return len(self.info)
- # This method has to write file in a particular
- # way so that ifcfg-rh's inotify mechanism triggeres
- # TODORV: check that it is still true.
+ # ifcfg-rh is using inotify IN_CLOSE_WRITE event
+ # so we don't use temporary file for new configuration.
def write(self, dir=None):
"""Writes values into ifcfg file."""