From 76ff750a6b057dacba1361726f15cd5bd4bfe14b Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 16 May 2011 19:57:39 -0700 Subject: reimplement commit hooks mechanism * do NOT reinvent the wheel (directory traversal, sorting, script execution, etc.) when the functionality is already provided by the system. * eliminate hard-coded hook directory in various feastures. everyone should obtain the directory path from the config backend. --- etc/bash_completion.d/vyatta-cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index 0a62267..dfd73ac 100755 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -123,11 +123,12 @@ commit () args[${#args[@]}]="$arg" fi done - args+=("-C '$comment'") + export COMMIT_COMMENT="$comment" export COMMIT_VIA=cli /opt/vyatta/sbin/my_commit "${args[@]}" unset COMMIT_VIA + unset COMMIT_COMMENT } commit-confirm () -- cgit v1.2.3