summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-01-15 14:12:20 +0800
committerGitHub <noreply@github.com>2020-01-15 14:12:20 +0800
commit065a2d415a7d6faa7201e0d21ea73357100304e7 (patch)
treed73a378b2292f53465ae4021bb012ee31b7fcde8 /src/conf_mode
parentf7c3e427c19a0137f76a3291c888a21239b3a0db (diff)
parent187d34b82f80c9c251c81cf9b96aa8d52e9f21e2 (diff)
downloadvyos-1x-065a2d415a7d6faa7201e0d21ea73357100304e7.tar.gz
vyos-1x-065a2d415a7d6faa7201e0d21ea73357100304e7.zip
Merge pull request #207 from DmitriyEshenko/vrrp-nb
vrrp: T1884: Keep transition-script native behaviour and implement tr…
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/vrrp.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py
index d31be4cfb..1d8477769 100755
--- a/src/conf_mode/vrrp.py
+++ b/src/conf_mode/vrrp.py
@@ -37,6 +37,7 @@ config_tmpl = """
global_defs {
dynamic_interfaces
+ script_user root
}
{% for group in groups -%}
@@ -117,6 +118,10 @@ vrrp_instance {{ group.name }} {
{% if group.fault_script -%}
notify_fault "/usr/libexec/vyos/system/vrrp-script-wrapper.py --state fault --group {{ group.name }} --interface {{ group.interface }} {{ group.fault_script }}"
{% endif -%}
+
+ {% if group.stop_script -%}
+ notify_stop "/usr/libexec/vyos/system/vrrp-script-wrapper.py --state stop --group {{ group.name }} --interface {{ group.interface }} {{ group.stop_script }}"
+ {% endif -%}
}
{% endfor -%}
@@ -178,6 +183,7 @@ def get_config():
group["master_script"] = config.return_value("transition-script master")
group["backup_script"] = config.return_value("transition-script backup")
group["fault_script"] = config.return_value("transition-script fault")
+ group["stop_script"] = config.return_value("transition-script stop")
if config.exists("no-preempt"):
group["preempt"] = False