diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-05-16 20:11:14 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-05-16 20:11:14 -0700 |
commit | 66118ae92455bc482b4aa44ad0b7e064ae143af6 (patch) | |
tree | 6e62f88b159c95062d06f8678fb0ffdf6b8b7258 | |
parent | d20c373b18f2d2f870474d9eb63ad8f474cc1f2c (diff) | |
download | vyatta-cfg-system-66118ae92455bc482b4aa44ad0b7e064ae143af6.tar.gz vyatta-cfg-system-66118ae92455bc482b4aa44ad0b7e064ae143af6.zip |
eliminate hard-coded commit hook directory
-rwxr-xr-x | scripts/rl-system.init | 9 |
1 files 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 |