diff options
author | John Estabrook <jestabro@vyos.io> | 2025-04-16 11:21:59 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2025-05-22 13:26:48 -0500 |
commit | 0cf87061b4216af395651aa5b935a5c320737de3 (patch) | |
tree | c7edfaebc3e7d6de5a551901dbc2341098dd4b80 /python | |
parent | 8de29b3c35e4dc81ff5e4f92e666d760d251f6f0 (diff) | |
download | vyos-1x-0cf87061b4216af395651aa5b935a5c320737de3.tar.gz vyos-1x-0cf87061b4216af395651aa5b935a5c320737de3.zip |
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.
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/configsession.py | 6 |
1 files changed, 5 insertions, 1 deletions
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' |