Patch hostname in configuration file even if name is unsync

Ref https://github.com/GNS3/gns3-gui/issues/1889
This commit is contained in:
Julien Duponchelle committed 2017-02-27 12:48:05 +01:00
1 parent 8fd59c7967
commit 70e2b87ff0
5 files changed
+23 -6

No files matched your search

+1 -1
View File
@@ -307,7 +307,7 @@ class IOUVM(BaseNode):
if self.startup_config_file:
content = self.startup_config_content
content = content.replace(self._name, new_name)
content = re.sub(r"^hostname .+$", "hostname " + new_name, content, flags=re.MULTILINE)
self.startup_config_content = content
super(IOUVM, IOUVM).name.__set__(self, new_name)