diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-07-03 04:00:50 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-07-03 04:02:41 +0200 |
commit | f5ba26201a9e36f4054b673795a3b7298e9cb0d7 (patch) | |
tree | f9f94a73e1dc381c02ce5420823ded6d097c5bd8 /src/conf_mode/dns_forwarding.py | |
parent | 80e32b78f618644ec4f97b2b9f6a79ed254e52eb (diff) | |
download | vyos-1x-f5ba26201a9e36f4054b673795a3b7298e9cb0d7.tar.gz vyos-1x-f5ba26201a9e36f4054b673795a3b7298e9cb0d7.zip |
T1504: wait for commit lock before trying to update resolv.conf in the out of CLI mode.
Diffstat (limited to 'src/conf_mode/dns_forwarding.py')
-rwxr-xr-x | src/conf_mode/dns_forwarding.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py index 7559a0af6..491bb0120 100755 --- a/src/conf_mode/dns_forwarding.py +++ b/src/conf_mode/dns_forwarding.py @@ -23,6 +23,8 @@ import argparse import jinja2 import netifaces +import vyos.util + from vyos.config import Config from vyos import ConfigError @@ -265,6 +267,12 @@ def apply(dns): 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) |