From d5ceda7ce1d94af06278e28e98dbccb848e91702 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Wed, 21 Jul 2010 16:34:05 -0700 Subject: fix for bug 5882. --- src/cli_new.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli_new.c b/src/cli_new.c index 19aae1c..b0535d8 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -117,8 +117,6 @@ void bye(const char *msg, ...) fprintf(out_stream, "%s failed\n", (cli_operation_name) ? cli_operation_name : "Operation"); - if (is_silent_msg()) - exit(-1); va_start(ap, msg); if (is_echo()) printf("echo \""); @@ -2447,8 +2445,9 @@ system_out(const char *cmd, const char **outbuf) close( cp[0]); int ret = system(cmd); + close( cp[1]); - exit(ret); + exit(WEXITSTATUS(ret)); } else { //parent @@ -2463,6 +2462,7 @@ system_out(const char *cmd, const char **outbuf) int status; wait(&status); close(cp[0]); + return WEXITSTATUS(status); } } -- cgit v1.2.3 From 23178ba1906bebb908fd17c028b5fd96881e91de Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Wed, 21 Jul 2010 16:34:57 -0700 Subject: 0.16.102 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a3901a6..c4d18b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg (0.16.102) unstable; urgency=low + + * fix for bug 5882. + + -- Michael Larson Wed, 21 Jul 2010 16:34:56 -0700 + vyatta-cfg (0.16.101) unstable; urgency=low * fix for bug 5887 -- cgit v1.2.3 From 5ae890a9293cbe4a6c6ef358c07b32b9da7306fb Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 21 Jul 2010 16:44:27 -0700 Subject: output comp_help in addition to normal help --- etc/bash_completion.d/20vyatta-cfg | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index cb5e0dc..a96f0d9 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -725,10 +725,6 @@ generate_help_text () declare -a helps eval "items=( \"\${$1[@]}\" )" eval "helps=( \"\${$2[@]}\" )" - if [ -n "$vyatta_cfg_comp_help" ]; then - vyatta_help_text="\\n${vyatta_cfg_comp_help}" - return 0 - fi vyatta_help_text="\\nPossible completions:" for (( idx = 0; idx < ${#items[@]}; idx++ )); do vyatta_help_text="${vyatta_help_text}\\n\\x20\\x20" @@ -741,6 +737,17 @@ generate_help_text () fi vyatta_help_text="${vyatta_help_text}${helps[$idx]}" done + if [ -n "$vyatta_cfg_comp_help" ]; then + vyatta_help_text+="\\n\\nDetailed information:\\n" + local sIFS=$IFS + IFS=' ' + local chstr=$(echo -en "$vyatta_cfg_comp_help\n" \ + | while read comp_help_line; do + echo "vyatta_help_text+=\" $comp_help_line\\n\";" + done) + eval "$chstr" + IFS=$sIFS + fi } # this fills in $vyatta_help_text -- cgit v1.2.3 From 239630ae8d60dc2917e6f470d349263d33707406 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 21 Jul 2010 16:48:12 -0700 Subject: change quoting --- etc/bash_completion.d/20vyatta-cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index a96f0d9..3395638 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -743,7 +743,7 @@ generate_help_text () IFS=' ' local chstr=$(echo -en "$vyatta_cfg_comp_help\n" \ | while read comp_help_line; do - echo "vyatta_help_text+=\" $comp_help_line\\n\";" + echo "vyatta_help_text+=' $comp_help_line\\n';" done) eval "$chstr" IFS=$sIFS -- cgit v1.2.3 From 6e27821ea30d1aca5eba54285dbf3623823f1177 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 21 Jul 2010 18:35:40 -0700 Subject: 0.16.103 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index c4d18b4..f47946b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyatta-cfg (0.16.103) unstable; urgency=low + + * output comp_help in addition to normal help + * change quoting + + -- An-Cheng Huang Wed, 21 Jul 2010 18:35:40 -0700 + vyatta-cfg (0.16.102) unstable; urgency=low * fix for bug 5882. -- cgit v1.2.3 From 0c0548e9e0289ea5290c96a1f154d8adb2beb57a Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 22 Jul 2010 17:17:39 -0700 Subject: 0.16.103+larkspur1 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index f47946b..d81bb74 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg (0.16.103+larkspur1) unstable; urgency=low + + * UNRELEASED + + -- An-Cheng Huang Thu, 22 Jul 2010 17:17:39 -0700 + vyatta-cfg (0.16.103) unstable; urgency=low * output comp_help in addition to normal help -- cgit v1.2.3 From 6521907e2deb6b13a9048334d70657a2c4f12b73 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Thu, 22 Jul 2010 18:08:55 -0700 Subject: remove comment feature. --- etc/bash_completion.d/20vyatta-cfg | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 3395638..91cb738 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -1039,8 +1039,7 @@ vyatta_config_complete () fi if (( ${#COMP_WORDS[@]} < 2 )); then - declare -a hitems=( "comment" \ - "commit" \ + declare -a hitems=( "commit" \ "copy" \ "delete" \ "discard" \ @@ -1055,7 +1054,6 @@ vyatta_config_complete () "set" \ "show" ) declare -a hstrs=( \ - "Add comment to this configuration element" \ "Commit the current set of changes" \ "Copy a configuration element" \ "Delete a configuration element" \ @@ -1406,7 +1404,6 @@ complete -F vyatta_loadsave_complete save complete -F vyatta_loadsave_complete load complete -F vyatta_loadsave_complete merge complete -F vyatta_loadkey_complete loadkey -complete -F vyatta_config_complete comment complete -F vyatta_config_complete copy complete -F vyatta_config_complete rename -- cgit v1.2.3 From 9a9100e3f7d34d1e7589e3e93e6a27da9666d3da Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Thu, 22 Jul 2010 18:09:23 -0700 Subject: 0.16.103+larkspur2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d81bb74..6f0b546 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg (0.16.103+larkspur2) unstable; urgency=low + + * remove comment feature. + + -- Michael Larson Thu, 22 Jul 2010 18:09:23 -0700 + vyatta-cfg (0.16.103+larkspur1) unstable; urgency=low * UNRELEASED -- cgit v1.2.3 From a213dd1c48581294fc967e7198d78ca270c6ae46 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 23 Jul 2010 13:17:24 -0700 Subject: allow commit hook commands to write to stdout. --- src/commit2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commit2.c b/src/commit2.c index e3cc3df..05b3d9d 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -368,6 +368,7 @@ main(int argc, char** argv) setenv(ENV_COMMIT_STATUS,"FAILURE",1); } struct dirent *dirp = NULL; + restore_output(); while ((dirp = readdir(dp)) != NULL) { if (strcmp(dirp->d_name, ".") != 0 && strcmp(dirp->d_name, "..") != 0) { -- cgit v1.2.3 From fff64ad974f599c74f62547f4cd9d9dcd8dc6db4 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 23 Jul 2010 13:18:10 -0700 Subject: 0.16.103+larkspur3 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6f0b546..187dceb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg (0.16.103+larkspur3) unstable; urgency=low + + * allow commit hook commands to write to stdout. + + -- Michael Larson Fri, 23 Jul 2010 13:18:10 -0700 + vyatta-cfg (0.16.103+larkspur2) unstable; urgency=low * remove comment feature. -- cgit v1.2.3 From 2c2d2f6e9c3e27a5ab7422ff6b3474ca901de4da Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 27 Jul 2010 17:38:35 -0700 Subject: handle single quotes in comp_help --- etc/bash_completion.d/20vyatta-cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 91cb738..a89da66 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -738,10 +738,11 @@ generate_help_text () vyatta_help_text="${vyatta_help_text}${helps[$idx]}" done if [ -n "$vyatta_cfg_comp_help" ]; then + local hstr=${vyatta_cfg_comp_help//\'/\'\\\\\\\'\'} vyatta_help_text+="\\n\\nDetailed information:\\n" local sIFS=$IFS IFS=' ' - local chstr=$(echo -en "$vyatta_cfg_comp_help\n" \ + local chstr=$(echo -en "$hstr\n" \ | while read comp_help_line; do echo "vyatta_help_text+=' $comp_help_line\\n';" done) -- cgit v1.2.3 From 0c938c8f6e3da7ab69ad018d8b3f6604b4506479 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 27 Jul 2010 17:39:11 -0700 Subject: 0.16.103+larkspur4 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 187dceb..576a860 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg (0.16.103+larkspur4) unstable; urgency=low + + * handle single quotes in comp_help + + -- An-Cheng Huang Tue, 27 Jul 2010 17:39:11 -0700 + vyatta-cfg (0.16.103+larkspur3) unstable; urgency=low * allow commit hook commands to write to stdout. -- cgit v1.2.3