From 0d20a2c4601d55c58e15141715b34be2cdde9de9 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 11 Jan 2011 16:17:11 -0800 Subject: Fix 6671: commit-confirm checks if there is any configuraion change after confirm is requested (cherry picked from commit 2b9bd473a6341d5d2681e59120a4e689a52b25c5) --- etc/bash_completion.d/vyatta-cfg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index 0b37f1c..83be149 100755 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -101,6 +101,10 @@ show () commit () { + if ! vyatta_cli_shell_api sessionChanged; then + echo "No configuration changes to commit" + return 1; + fi local comment="commit" local next=0 local -a args=() @@ -128,6 +132,10 @@ commit () commit-confirm () { + if ! vyatta_cli_shell_api sessionChanged; then + echo "No configuration changes to commit" + return 1; + fi local -a args=() local first=1 local minutes=10 -- cgit v1.2.3