summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-04-20 10:29:55 -0700
committerJohn Estabrook <jestabro@vyos.io>2025-05-12 18:09:00 -0500
commitccce096eee3ba698d6d17de74e173b4a14847087 (patch)
treef072f51a88270555e00ce238285f05924acf6f20
parent9217434e24d362da4165eafc95a41730e4c2e161 (diff)
downloadvyatta-cfg-ccce096eee3ba698d6d17de74e173b4a14847087.tar.gz
vyatta-cfg-ccce096eee3ba698d6d17de74e173b4a14847087.zip
T7374: teardown vyconf config session on CLI config session exit
-rw-r--r--functions/interpreter/vyatta-cfg-run4
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."