diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2011-01-11 16:17:11 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2011-01-11 16:39:34 -0800 |
commit | 0d20a2c4601d55c58e15141715b34be2cdde9de9 (patch) | |
tree | 9569c9f810f88f4b0822b089bd307e4cfb3199df | |
parent | 9c4b03e8b8d49aafea2ebb7a1d9a97639bd87fd5 (diff) | |
download | vyatta-cfg-0d20a2c4601d55c58e15141715b34be2cdde9de9.tar.gz vyatta-cfg-0d20a2c4601d55c58e15141715b34be2cdde9de9.zip |
Fix 6671: commit-confirm checks if there is any configuraion change after confirm is requested
(cherry picked from commit 2b9bd473a6341d5d2681e59120a4e689a52b25c5)
-rwxr-xr-x | etc/bash_completion.d/vyatta-cfg | 8 |
1 files changed, 8 insertions, 0 deletions
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 |