1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Fix restoration of private config when using dynamips

Fix #906
This commit is contained in:
Julien Duponchelle 2017-02-23 18:21:00 +01:00
parent 420c3792eb
commit 366c567864
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -534,6 +534,8 @@ class Dynamips(BaseManager):
elif private_config_content: elif private_config_content:
private_config_path = self._create_config(vm, default_private_config_path, private_config_content) private_config_path = self._create_config(vm, default_private_config_path, private_config_content)
yield from vm.set_configs(vm.startup_config, private_config_path) yield from vm.set_configs(vm.startup_config, private_config_path)
elif os.path.isfile(default_private_config_path) and os.path.getsize(default_private_config_path) > 0:
yield from vm.set_configs(vm.startup_config, default_private_config_path)
def _create_config(self, vm, path, content=None): def _create_config(self, vm, path, content=None):
""" """