diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-07-12 15:36:11 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-07-12 15:36:11 +0200 |
commit | 37a4d98daee93f57c19d3889e0e660c7645d6303 (patch) | |
tree | 06a80bfc5114b15bdf591a214e0092b0eac1d394 /src/conf_mode | |
parent | 1725f958cf28578583a49462d0a9ebc707978fb3 (diff) | |
download | vyos-1x-37a4d98daee93f57c19d3889e0e660c7645d6303.tar.gz vyos-1x-37a4d98daee93f57c19d3889e0e660c7645d6303.zip |
Do not try to verify the config when host_name.py is called from dhclient script.
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/host_name.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 27cc336d8..651c1c392 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -110,6 +110,8 @@ def get_config(arguments): conf.return_values = conf.return_effective_values hosts['hostname'] = conf.return_value("system host-name") + if not hosts['hostname']: + hosts['hostname'] = default_config_data['hostname'] hosts['domain_name'] = conf.return_value("system domain-name") if hosts['domain_name']: @@ -226,7 +228,8 @@ if __name__ == '__main__': try: c = get_config(args) - verify(c) + if not args.dhclient: + verify(c) generate(c) apply(c) except ConfigError as e: |