summaryrefslogtreecommitdiff
path: root/src/conf_mode/host_name.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-07-03 13:29:52 +0200
committerDaniil Baturin <daniil@baturin.org>2019-07-03 13:29:52 +0200
commit6b759f81fec573859798a6d3f971bfaa0b1960c6 (patch)
treeb6293821e8837754bc07a1ca4f5501b755016545 /src/conf_mode/host_name.py
parentacd5f855bcca98008719d0ef371be3076861b4f1 (diff)
downloadvyos-1x-6b759f81fec573859798a6d3f971bfaa0b1960c6.tar.gz
vyos-1x-6b759f81fec573859798a6d3f971bfaa0b1960c6.zip
T1497: make host_name.py wait for commit lock too.
Diffstat (limited to 'src/conf_mode/host_name.py')
-rwxr-xr-xsrc/conf_mode/host_name.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index b0a4648c7..6fb7031a8 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -29,6 +29,8 @@ import subprocess
import argparse
import jinja2
+import vyos.util
+
from vyos.config import Config
from vyos import ConfigError
@@ -273,6 +275,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)