summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-03-17 18:11:19 +0100
committerGitHub <noreply@github.com>2024-03-17 18:11:19 +0100
commit2bf1aeb17f830969a75655e496a48cc8501192f5 (patch)
tree6bf50a4b1da02a2758bbc690491e8d2b5af231fb
parent5daebff4a5cc570f22c75e002ded8564b8e22e33 (diff)
parent4291a1a423c3cbbae9e4142575b36d6fbe1c126f (diff)
downloadvyos-1x-2bf1aeb17f830969a75655e496a48cc8501192f5.tar.gz
vyos-1x-2bf1aeb17f830969a75655e496a48cc8501192f5.zip
Merge pull request #3140 from c-po/config-mgmt-T6133
T6133: append domain-name to commit-archive if defined
-rw-r--r--python/vyos/config_mgmt.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/config_mgmt.py b/python/vyos/config_mgmt.py
index ff078649d..28ccee769 100644
--- a/python/vyos/config_mgmt.py
+++ b/python/vyos/config_mgmt.py
@@ -132,6 +132,9 @@ class ConfigMgmt:
{}).get('source_address', '')
if config.exists(['system', 'host-name']):
self.hostname = config.return_value(['system', 'host-name'])
+ if config.exists(['system', 'domain-name']):
+ tmp = config.return_value(['system', 'domain-name'])
+ self.hostname += f'.{tmp}'
else:
self.hostname = 'vyos'