diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-07-03 13:29:52 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-07-04 11:49:51 +0200 |
commit | beab961cedbd49024f1944b35821dc9bd8562987 (patch) | |
tree | 7c35930da5dd7dd555502dbc82c2b90bf2a329a0 /src | |
parent | 6e16353c0162302985355cb642298e3bbb2b6061 (diff) | |
download | vyos-1x-beab961cedbd49024f1944b35821dc9bd8562987.tar.gz vyos-1x-beab961cedbd49024f1944b35821dc9bd8562987.zip |
T1497: make host_name.py wait for commit lock too.
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/host_name.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 475f68b49..5055faa65 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -28,6 +28,8 @@ import glob import argparse import jinja2 +import vyos.util + from vyos.config import Config from vyos import ConfigError @@ -210,6 +212,13 @@ def apply(config): if __name__ == '__main__': args = parser.parse_args() + + if args.dhclient: + # There's a big chance it was triggered by a commit still in progress + # so we need to wait until the new values are in the running config + vyos.util.wait_for_commit_lock() + + try: c = get_config(args) verify(c) |