From 0cf87061b4216af395651aa5b935a5c320737de3 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 16 Apr 2025 11:21:59 -0500 Subject: T7363: use legacy environment variable to indicate config mode In the absence of Cstore, the env var remains as the sole indication of config mode for the legacy CLI, and its emulation here. --- python/vyos/configsession.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py index a3be29881..6490e6feb 100644 --- a/python/vyos/configsession.py +++ b/python/vyos/configsession.py @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2024 VyOS maintainers and contributors +# Copyright (C) 2019-2025 VyOS maintainers and contributors # # This library is free software; you can redistribute it and/or modify it under the terms of # the GNU Lesser General Public License as published by the Free Software Foundation; @@ -120,6 +120,10 @@ def inject_vyos_env(env): env['vyos_sbin_dir'] = '/usr/sbin' env['vyos_validators_dir'] = '/usr/libexec/vyos/validators' + # with the retirement of the Cstore backend, this will remain as the + # sole indication of legacy CLI config mode, as checked by VyconfSession + env['_OFR_CONFIGURE'] = 'ok' + # if running the vyos-configd daemon, inject the vyshim env var if is_systemd_service_running('vyos-configd.service'): env['vyshim'] = '/usr/sbin/vyshim' -- cgit v1.2.3