From 1666e3d99b8de700c880f09ce6ad5ea8bc7f4568 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 8 Dec 2024 15:41:53 +0100 Subject: frr: T6746: add default entry for config debug file A lot of services have dynamic debug capabilities which will be turned on by creating a file in /tmp. These scripts have the path hardcoded and sometimes accross multiple places (bad). This commit introduces vyos.defaults.frr_debug_enable to get the path for the debug file from a single location. --- python/vyos/frr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/vyos/frr.py') diff --git a/python/vyos/frr.py b/python/vyos/frr.py index 183805e13..67279a6f7 100644 --- a/python/vyos/frr.py +++ b/python/vyos/frr.py @@ -69,6 +69,7 @@ import tempfile import re from vyos import ConfigError +from vyos.defaults import frr_debug_enable from vyos.utils.process import cmd from vyos.utils.process import popen from vyos.utils.process import STDOUT @@ -144,7 +145,7 @@ class ConfigSectionNotFound(FrrError): def init_debugging(): global DEBUG - DEBUG = os.path.exists('/tmp/vyos.frr.debug') + DEBUG = os.path.exists(frr_debug_enable) if DEBUG: LOG.setLevel(logging.DEBUG) -- cgit v1.2.3