From 4e85f8981ff93348c74f637730dad097eaaddc1a Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 16 May 2011 20:18:05 -0700 Subject: eliminate hard-coded commit hook directory --- scripts/vyatta-commit-revs.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/vyatta-commit-revs.pl b/scripts/vyatta-commit-revs.pl index 0c49008..f9fd2ff 100755 --- a/scripts/vyatta-commit-revs.pl +++ b/scripts/vyatta-commit-revs.pl @@ -54,8 +54,10 @@ my $tmp_config_file = "/tmp/config.boot.$$"; my $commit_status = $ENV{'COMMIT_STATUS'}; my $commit_via = $ENV{'COMMIT_VIA'}; +my $commit_cmt = $ENV{'COMMIT_COMMENT'}; $commit_status = 'unknown' if !defined $commit_via; $commit_via = 'other' if !defined $commit_via; +$commit_cmt = 'commit' if !defined $commit_cmt; if (! -d $archive_dir) { system("sudo mkdir $archive_dir"); @@ -75,7 +77,7 @@ if (! defined $rollback) { system("sudo logrotate -f -s $lr_state_file $lr_conf_file"); my $user = getlogin() || getpwuid($>) || "unknown"; -cm_commit_add_log($user, $commit_via, $ARGV[0]); +cm_commit_add_log($user, $commit_via, $commit_cmt); exit 0; -- cgit v1.2.3