diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-30 10:42:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-30 10:42:56 +0100 |
commit | 0591d03464248c3a50516cd00b04989b3f16f1e5 (patch) | |
tree | 3e5c6aa2e4a8408f42f2f5fed8f3128f7d8daf04 /src/conf_mode | |
parent | e9883143310993d87ba2e0c8ec7ef3b9faf928b1 (diff) | |
parent | 584c63f4473373a377db802c173f6252c8085fa3 (diff) | |
download | vyos-1x-0591d03464248c3a50516cd00b04989b3f16f1e5.tar.gz vyos-1x-0591d03464248c3a50516cd00b04989b3f16f1e5.zip |
Merge pull request #2718 from indrajitr/shorten-domain-search-path
system: T5877: Shorten system domain-search config path
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/host_name.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 36d1f6493..6204cf247 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -61,8 +61,9 @@ def get_config(config=None): hosts['domain_name'] = conf.return_value(['system', 'domain-name']) hosts['domain_search'].append(hosts['domain_name']) - for search in conf.return_values(['system', 'domain-search', 'domain']): - hosts['domain_search'].append(search) + if conf.exists(['system', 'domain-search']): + for search in conf.return_values(['system', 'domain-search']): + hosts['domain_search'].append(search) if conf.exists(['system', 'name-server']): for ns in conf.return_values(['system', 'name-server']): |