diff options
author | John Estabrook <jestabro@vyos.io> | 2025-05-23 12:56:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-23 12:56:56 -0500 |
commit | 7ad72b356123214946c6f8c0f3c801fcd8b0c562 (patch) | |
tree | f072f51a88270555e00ce238285f05924acf6f20 | |
parent | 9217434e24d362da4165eafc95a41730e4c2e161 (diff) | |
parent | ccce096eee3ba698d6d17de74e173b4a14847087 (diff) | |
download | vyatta-cfg-7ad72b356123214946c6f8c0f3c801fcd8b0c562.tar.gz vyatta-cfg-7ad72b356123214946c6f8c0f3c801fcd8b0c562.zip |
Merge pull request #99 from jestabro/config-context
T7374: teardown vyconf config session on CLI config session exit
-rw-r--r-- | functions/interpreter/vyatta-cfg-run | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run index d1dbd51..26013d7 100644 --- a/functions/interpreter/vyatta-cfg-run +++ b/functions/interpreter/vyatta-cfg-run @@ -285,6 +285,10 @@ up () really_exit() { + if test -f "/var/run/vyconf_backend"; then + local exit_cmd="${vyos_libexec_dir}/teardown-config-session.py $$" + eval "sudo sg vyattacfg \"$exit_cmd\"" + fi if vyatta_cli_shell_api sessionUnsaved; then echo "Warning: configuration changes have not been saved." |