summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-03-17 14:43:57 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-03-17 17:12:07 +0000
commit443c9018a55eb05c617c28e6528167430984b17e (patch)
treea0313d65732bb90f46fb938f6bb132439069612d /python/vyos
parentd18d773238efc34026a580fc7f5f79c408ea8cfa (diff)
downloadvyos-1x-443c9018a55eb05c617c28e6528167430984b17e.tar.gz
vyos-1x-443c9018a55eb05c617c28e6528167430984b17e.zip
T6133: append domain-name to commit-archive if defined
(cherry picked from commit 4291a1a423c3cbbae9e4142575b36d6fbe1c126f)
Diffstat (limited to 'python/vyos')
-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'