summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-03-28 21:47:32 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-03-28 21:49:52 -0500
commite21b9658f05743c36c664f625feed86ef7f420c6 (patch)
treee97a37553602b89a70eee2484f5601937a5cea92 /src/op_mode
parent53a7d9b6cb2f6641e40ac72dc2d5d51a2684a591 (diff)
downloadvyos-1x-e21b9658f05743c36c664f625feed86ef7f420c6.tar.gz
vyos-1x-e21b9658f05743c36c664f625feed86ef7f420c6.zip
T7294: preserve /config symlinks on image upgrade
The service certbot expects symbolic links for /config/auth/letsencrypt/live/<cert_name>/*.pem however, the default behavior of copytree copies the linked files during image upgrade. Set copytree argument to preserve symlinks.
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/image_installer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py
index 82756daec..3fe9737da 100755
--- a/src/op_mode/image_installer.py
+++ b/src/op_mode/image_installer.py
@@ -1007,7 +1007,7 @@ def add_image(image_path: str, vrf: str = None, username: str = '',
Path(target_config_dir).mkdir(parents=True)
chown(target_config_dir, group='vyattacfg')
chmod_2775(target_config_dir)
- copytree('/opt/vyatta/etc/config/', target_config_dir,
+ copytree('/opt/vyatta/etc/config/', target_config_dir, symlinks=True,
copy_function=copy_preserve_owner, dirs_exist_ok=True)
else:
Path(target_config_dir).mkdir(parents=True)