summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/helpers/vyos-merge-config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/vyos-merge-config.py b/src/helpers/vyos-merge-config.py
index f0d5d1595..bb2919de2 100755
--- a/src/helpers/vyos-merge-config.py
+++ b/src/helpers/vyos-merge-config.py
@@ -64,6 +64,10 @@ merge_config_tree = ConfigTree(config_file)
effective_config = Config()
output_effective_config = effective_config.show_config()
+# showConfig (called by config.show_config() does not escape
+# backslashes, which configtree expects; cf. T1001.
+output_effective_config = output_effective_config.replace("\\", "\\\\")
+
effective_config_tree = ConfigTree(output_effective_config)
effective_cmds = effective_config_tree.to_commands()