From 66118ae92455bc482b4aa44ad0b7e064ae143af6 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 16 May 2011 20:11:14 -0700 Subject: eliminate hard-coded commit hook directory --- scripts/rl-system.init | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/rl-system.init b/scripts/rl-system.init index d6f974f7..20534897 100755 --- a/scripts/rl-system.init +++ b/scripts/rl-system.init @@ -206,8 +206,13 @@ start () { fi done - # Remove links from the commit hook directory - rm -f /etc/commit/* + # Remove links from the post-commit hooks directory. + # note that this approach only supports hooks that are "configured", + # i.e., it does not support hooks that need to always be present. + cpostdir=$(cli-shell-api getPostCommitHookDir) + if [ -d "$cpostdir" ]; then + rm -f $cpostdir/* + fi ## Clear out apt config file--it will be filled in by config load empty /etc/apt/sources.list -- cgit v1.2.3