diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-08-19 16:01:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-19 16:01:29 +0100 |
| commit | 11d4c4719c45807c9fa4449479b359402f9c054b (patch) | |
| tree | 894ee0236a3ee0139a746db09bcafc0c615724d2 /cloudinit | |
| parent | f9e8129a8ee2d1afb88081b895b2fbe0700e7112 (diff) | |
| parent | 211dd7518f4303490ad7642f2bc1a018cda7ec49 (diff) | |
| download | vyos-cloud-init-11d4c4719c45807c9fa4449479b359402f9c054b.tar.gz vyos-cloud-init-11d4c4719c45807c9fa4449479b359402f9c054b.zip | |
Merge pull request #89 from Bartosz-lab/current
feat(T7206): Fix vyos default config path
Diffstat (limited to 'cloudinit')
| -rw-r--r-- | cloudinit/config/cc_vyos.py | 2 | ||||
| -rw-r--r-- | cloudinit/config/cc_vyos_userdata.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index 96324e4b..5894482f 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -1047,7 +1047,7 @@ def handle(name, cfg, cloud, log, _args): # VyOS configuration file selection cfg_file_name = '/opt/vyatta/etc/config/config.boot' - bak_file_name = '/opt/vyatta/etc/config.boot.default' + bak_file_name = '/usr/share/vyos/config.boot.default' # open configuration file if not Path(cfg_file_name).exists(): diff --git a/cloudinit/config/cc_vyos_userdata.py b/cloudinit/config/cc_vyos_userdata.py index 21deb3d6..b4367206 100644 --- a/cloudinit/config/cc_vyos_userdata.py +++ b/cloudinit/config/cc_vyos_userdata.py @@ -32,7 +32,7 @@ frequency = PER_INSTANCE TEMPLATES_DIR = '/opt/vyatta/share/vyatta-cfg/templates/' # VyOS configuration files CFG_FILE_MAIN = '/opt/vyatta/etc/config/config.boot' -CFG_FILE_DEFAULT = '/opt/vyatta/etc/config.boot.default' +CFG_FILE_DEFAULT = '/usr/share/vyos/config.boot.default' # get list of all tag nodes @@ -209,10 +209,10 @@ def handle(name, cfg, cloud, log, _args): # save a new configuration file try: - with open(config_file_path, 'w') as f: + with open(CFG_FILE_MAIN, 'w') as f: f.write(config.to_string()) logger.debug( - "Configuration file saved: {}".format(config_file_path)) + "Configuration file saved: {}".format(CFG_FILE_MAIN)) except Exception as err: logger.error("Failed to write config into the file {}: {}".format( - config_file_path, err)) + CFG_FILE_MAIN, err)) |
