mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix renaming IOL hostname replaces %h only in a single place. Fixes #1707
This commit is contained in:
1 parent
825dc5996d
commit
a47fa83cec
2 files changed
+2
-2
No files matched your search
@@ -1532,7 +1532,7 @@ class Router(BaseNode):
|
||||
try:
|
||||
with open(self.startup_config_path, "r+", encoding="utf-8", errors="replace") as f:
|
||||
old_config = f.read()
|
||||
new_config = re.sub(r"^hostname .+$", "hostname " + new_name, old_config, flags=re.MULTILINE)
|
||||
new_config = re.sub(r"hostname .+$", "hostname " + new_name, old_config, flags=re.MULTILINE)
|
||||
f.seek(0)
|
||||
f.write(new_config)
|
||||
except OSError as e:
|
||||
|
||||
Reference in new issue
Block a user