summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-07-03 04:00:50 +0200
committerDaniil Baturin <daniil@baturin.org>2019-07-03 04:00:50 +0200
commit65f5e295c3dbe72ca3df831c552d7bc92389c958 (patch)
tree760a9b004eac9336c70dc9c33493c4f7e4a14342 /src
parentc1fdee12f94dcf4395992152358d03cb8c74f155 (diff)
downloadvyos-1x-65f5e295c3dbe72ca3df831c552d7bc92389c958.tar.gz
vyos-1x-65f5e295c3dbe72ca3df831c552d7bc92389c958.zip
T1504: wait for commit lock before trying to update resolv.conf in the out of CLI mode.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index 0ce2eee2c..b9a5b99e9 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)