Fixed startup-config is lost if you change any IOS router settings. Fixes #1233.

This commit is contained in:
grossmj 2016-05-21 13:20:18 -06:00
parent acdc1e5ebb
commit 67e346ba92

View File

@ -603,8 +603,8 @@ class Dynamips(BaseManager):
elif startup_config_content:
startup_config_path = self._create_config(vm, default_startup_config_path, startup_config_content)
yield from vm.set_configs(startup_config_path)
# An empty startup config crash dynamips
else:
elif os.path.isfile(default_startup_config_path) and os.path.getsize(default_startup_config_path) == 0:
# An empty startup-config may crash Dynamips
startup_config_path = self._create_config(vm, default_startup_config_path, "!\n")
yield from vm.set_configs(startup_config_path)