From 8c18c433b1fe85c3e5f246744474ab3d5cb59823 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 22 May 2019 11:51:26 -0500 Subject: T1397: Rewrite the config merge script Add support for the config merge script in vyos-1x. --- etc/bash_completion.d/vyatta-cfg | 14 +++++++------- functions/interpreter/vyatta-cfg-run | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index 7e37e74..cf72330 100755 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -201,13 +201,13 @@ vyatta_loadsave_complete() echo -e " https:///\t\t\tLoad from file on remote machine" echo -e " tftp:///\t\t\tLoad from file on remote machine" elif [ "$command" = "merge" ]; then - echo -e " \t\t\t\tMerge from system config file" - echo -e " \t\t\t\tMerge from file on local machine" - echo -e " scp://:@/\tMerge from file on remote machine" - echo -e " sftp://:@/\tMerge from file on remote machine" - echo -e " ftp://:@/\tMerge from file on remote machine" - echo -e " http:///\t\t\tMerge from file on remote machine" - echo -e " tftp:///\t\t\tMerge from file on remote machine" + echo -e " \t\t\t\t\tMerge from file on local machine" + echo -e " scp://[:]@/\t\tMerge from file on remote machine" + echo -e " sftp://[:]@/\tMerge from file on remote machine" + echo -e " http:///\t\t\t\tMerge from file on remote machine" + echo -e " https:///\t\t\t\tMerge from file on remote machine" + echo -e " ftp://[:]@/\t\tMerge from file on remote machine" + echo -e " tftp:///\t\t\t\tMerge from file on remote machine" elif [ "$command" = "save" ]; then echo -e " \t\t\t\tSave to system config file" echo -e " \t\t\t\tSave to file on local machine" diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run index e0bcfaf..a274e24 100644 --- a/functions/interpreter/vyatta-cfg-run +++ b/functions/interpreter/vyatta-cfg-run @@ -236,13 +236,13 @@ vyatta_config_merge () { # don't load if there are uncommitted changes. if vyatta_cli_shell_api sessionChanged; then - echo "Cannot load: configuration modified." - echo "Commit or discard the changes before loading a config file." + echo "Cannot merge: configuration modified." + echo "Commit or discard the changes before merging a config file." return 1 fi # return to top level. reset_edit_level - ${vyatta_sbindir}/vyatta-load-config.pl "$@" --merge + ${vyos_libexec_dir}/vyos-merge-config.py "$@" } top () -- cgit v1.2.3